Skip to contentSkip to conversation

gcc-3.3 and problems in the 64 bit kernel

parisc-linux James Bottomley 1 participant 1 message Feb 13, 2004

lore
Share & tools
lore
#0 lore raw

our 64 bit gcc-3.3 (all versions) has a miscompilation problem that results in a BUG() in the 64 bit kernel. This shows up as:

kernel BUG at mm/shmem.c:585

The problem turns out to be that gcc-3.3 is violating the OPD rules for static functions (OPD == Official Procedure Descriptor and is supposed to ensure that there's only one function descriptor per function, allowing pointers to function descriptors to be compared directly instead of having to be dereferenced).

The problem is generated because this comparison:

if (inode->i_op->truncate == shmem_truncate)

which is a function pointer comparison is always false.

There are several other function pointer comparisons in the kernel which are in danger of failing in this manner, so the resulting kernel will not operate correctly.

Hopefully, the gcc people will be able to fix this, but in the mean time people should stick to gcc-3.0 to compile 64 bit kernels. (gcc-3.3 is fine for 32 bit parisc kernels).

James