Skip to contentSkip to conversation

gcc-3.2.2 miscompiles kernel 2.4.* O_DIRECT code ?

DISCUSSION Rob van Nieuwkerk 2 participants 3 messages Jun 17, 2003

lore
Share & tools
lore
#0 lore raw

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
#1 lore raw
Quoted 5 lines · Rob van Nieuwkerk

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.

#2 lore raw
Quoted 10 lines · Felipe Alfaro Solana
Quoted 5 lines · Rob van Nieuwkerk

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