Bug 64004 - Bug shows up in raid1 component that appears to be a compiler bug
Summary: Bug shows up in raid1 component that appears to be a compiler bug
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 7.1
Hardware: alpha
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-04-23 17:36 UTC by alvin
Modified: 2007-04-18 16:42 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 2004-10-04 23:22:13 UTC


Attachments (Terms of Use)

Description alvin 2002-04-23 17:36:34 UTC
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 23:22:13 UTC
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.