Bug 64004 - Bug shows up in raid1 component that appears to be a compiler bug
Bug shows up in raid1 component that appears to be a compiler bug
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
7.1
alpha Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-04-23 13:36 EDT by alvin
Modified: 2007-04-18 12:42 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-04 19:22:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description alvin 2002-04-23 13:36:34 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.19-6.2.7.iplink2 i686)

Description of problem:
raid1.o will crash with a bad pointer but when a change is made that changes the
optimization and flow of the code the bug goes away.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
This uses gcc
 gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-101)

1. compile 2.4.x(X>9) kernel with raid1
2. test for crash
3. change code
4. compile
5. test
	

Additional info:

from raid1.c

        /* Find the disk which is closest */

        do {
                if (disk <= 0)
                        disk = conf->raid_disks;
                disk--;
                if ((conf->mirrors[disk].write_only) ||
                                (!conf->mirrors[disk].operational))

by changinging the code to:
        /* Find the disk which is closest */

        do {
                if (disk <= 0)
                        disk = conf->raid_disks;
                disk--;
                md_bugcheck(disk);
                if ((conf->mirrors[disk].write_only) ||
                                (!conf->mirrors[disk].operational))
                        continue;

the problem seems to go away.
the md_bugcheck is a routeine declaired in md.c that just returns.


raid1 will not load with a kernel built with this compiler and code.
Comment 1 Jakub Jelinek 2004-10-04 19:22:13 EDT
GCC 2.96-RH is now too old and there is not a self-contained testcase
for this.
If you manage to reproduce this with some recent GCC, please reopen.

Note You need to log in before you can comment on or make changes to this bug.