2003-06-17 12:23:55

by Rob van Nieuwkerk

[permalink] [raw]
Subject: gcc-3.2.2 miscompiles kernel 2.4.* O_DIRECT code ?

Hi,

I found out that O_DIRECT does not work correctly on 2.4 kernels
compiled with the RH gcc-3.2.2-5 on RH9. It is working fine with
kernels compiled with the RH gcc-2.96-113 on RH 7.3.

The sympton is that read() only returns zeroes (as data). No errors.
It happens with several 2.4 kernels I have tried, including 2.4.21-ac1.

I don't know if this is a RH9 gcc specific bug or if it is a generic
gcc3 problem. That's why I post here: to find out if more people
have seen this.

I also filed a bug in RH's bugzilla. See this for more details:

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=97529


greetings,
Rob van Nieuwkerk


2003-06-17 13:47:46

by Felipe Alfaro Solana

[permalink] [raw]
Subject: Re: gcc-3.2.2 miscompiles kernel 2.4.* O_DIRECT code ?

On Tue, 2003-06-17 at 14:37, Rob van Nieuwkerk wrote:
> Hi,
>
> I found out that O_DIRECT does not work correctly on 2.4 kernels
> compiled with the RH gcc-3.2.2-5 on RH9. It is working fine with
> kernels compiled with the RH gcc-2.96-113 on RH 7.3.

Could you please try with gcc 3.3? I had similar problems when compiling
2.5 kernels with gcc 3.2. Compiling them with gcc 3.3 or 2.96 fixed the
problems.

2003-06-17 16:15:57

by Rob van Nieuwkerk

[permalink] [raw]
Subject: Re: gcc-3.2.2 miscompiles kernel 2.4.* O_DIRECT code ?


Felipe Alfaro Solana wrote:
> On Tue, 2003-06-17 at 14:37, Rob van Nieuwkerk wrote:
> > Hi,
> >
> > I found out that O_DIRECT does not work correctly on 2.4 kernels
> > compiled with the RH gcc-3.2.2-5 on RH9. It is working fine with
> > kernels compiled with the RH gcc-2.96-113 on RH 7.3.
>
> Could you please try with gcc 3.3? I had similar problems when compiling
> 2.5 kernels with gcc 3.2. Compiling them with gcc 3.3 or 2.96 fixed the
> problems.

I compiled a 2.4.21-ac1 kernel with the gcc-3.3-7 packages from RH
Rawhide. This solves the problem: O_DIRECT working correctly again.

greetings,
Rob van Nieuwkerk