Bug 29487 - Incorrectly Compiled 2.4.2 kernel
Summary: Incorrectly Compiled 2.4.2 kernel
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc   
(Show other bugs)
Version: 7.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-02-25 23:58 UTC by Daryll
Modified: 2007-04-18 16:31 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-02-26 23:57:19 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Daryll 2001-02-25 23:58:36 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.4.1-0.1.9 i686)


In the 2.4.2 kernel udelay is a macro that checks if you are attempting to
pass a delay of >20000 and calls a non-existant a bad_udelay() function.
The wavelan_cs module in drivers/net/pcmcia makes multiple calls to udelay
but never with a value greater than 100.  Yet, the compiler is making the
calls to bad_udelay.

Reproducible: Always
Steps to Reproduce:
1. Compile the 2.4.2 kernel sources with no patches
2. nm -B /usr/src/linux/drivers/net/pcmcia/wavelan_cs.o | grep bad_udelay
3.
	

Actual Results:           U __bad_udelay


Expected Results:  Nothing

Comment 1 Jakub Jelinek 2001-02-26 10:30:45 UTC
I remember fixing similar thing in gcc-2.96-72, are you sure you have say
2.96-75 or later?
If yes, can you please attach here wavelan_cs.i (add -save-temps -v options
to the gcc command which creates wavelan_cs.o) and also post full gcc command
line used? It maybe config related etc., by working on preprocessed output
we can be sure we're seeing the same thing. Thanks.

Comment 2 Jakub Jelinek 2001-02-26 12:45:45 UTC
FYI I've just tried it and could not get __bad_udelay unresolved in any of
-march=i386, -march=i686, -march=k6 or -march=athlon. So, I really need your
feedback on this.

Comment 3 Daryll 2001-02-26 19:41:17 UTC
I WAS able to reproduce it consistently. I even tried applying the redhat
patches to the wavelan driver to see if changing the function from inline to a
macro made it better. It didn't. Today I've redone the compile several times and
I can't make bad_udelay occur. Maybe there's an uninitialized variable somewhere
and I can't reproduce the circumstances.



Comment 4 Glen Foster 2001-02-26 23:57:15 UTC
We (Red Hat) should really try to resolve this before next release.

Comment 5 Jakub Jelinek 2001-03-22 15:56:14 UTC
If you are able to reproduce this, please reopen this bug.

Comment 6 Need Real Name 2001-04-16 19:13:08 UTC
This is reproducible with gcc 2.96-69.  According to the maintainers
of wavelan.c and include/asm-i386/delay.h it's a defect in that rev
of gcc where __builtin_constant_p() doesn't work.  2.96-69 is what's
currently on updates.redhat.com for 7.0.

How hard is it to get a newer gcc released as a 7.0 update?



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