breaks on XFree86 build at -O2

Bug #7910 reported by Daniel Stone
6
Affects Status Importance Assigned to Milestone
gcc-3.3 (Ubuntu)
Invalid
Critical
Matthias Klose

Bug Description

With -O2, gcc sometimes produces files that have truncated symbols; given the
buildds are OK, this may be a local problem, but it is 100% reproducible on
certain files within the XFree86 tree:
daniels@nanasawa:~/canonical/xfree86/xfree86-4.3.0.dfsg.1/build-tree/xc/programs/xkbcomp%
make
gcc -m32 -g -O2 -fno-strict-aliasing -ansi -pedantic -Wall -Wpointer-arith
-Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -Wredundant-decls
-Wnested-externs -Wundef -I../../include/extensions -I../..
-I../../exports/include -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L
                   -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE
-D_SVID_SOURCE -D_GNU_SOURCE
     -DFUNCPROTO=15 -DNARROWPROTO -c -o keytypes.o keytypes.c
rm -f xkbcomp
gcc -m32 -o xkbcomp -g -O2 -fno-strict-aliasing -ansi -pedantic -Wall
-Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -Wredundant-decls
-Wnested-externs -Wundef -L../../exports/lib xkbcomp.o xkbscan.o expr.o
vmod.o indicators.o misc.o alias.o keymap.o keycodes.o keytypes.o
compat.o action.o symbols.o geometry.o xkbpath.o listing.o
       xkbparse.o parseutils.o utils.o -lxkbfile -lXext -lX11
-Wl,-rpath-link,../../exports/lib
keytypes.o: could not read symbols: File truncated
collect2: ld returned 1 exit status
make: *** [xkbcomp] Error 1
daniels@nanasawa:~/canonical/xfree86/xfree86-4.3.0.dfsg.1/build-tree/xc/programs/xkbcomp%
rm keytypes.o
daniels@nanasawa:~/canonical/xfree86/xfree86-4.3.0.dfsg.1/build-tree/xc/programs/xkbcomp%
gcc -m32 -g -fno-strict-aliasing -ansi -pedantic -Wall -Wpointer-arith
-Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -Wredundant-decls
-Wnested-externs -Wundef -I../../include/extensions -I../..
-I../../exports/include -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L
                   -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE
-D_SVID_SOURCE -D_GNU_SOURCE
     -DFUNCPROTO=15 -DNARROWPROTO -c -o keytypes.o keytypes.c
daniels@nanasawa:~/canonical/xfree86/xfree86-4.3.0.dfsg.1/build-tree/xc/programs/xkbcomp%
make xkbcomp
rm -f xkbcomp
gcc -m32 -o xkbcomp -g -O2 -fno-strict-aliasing -ansi -pedantic -Wall
-Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -Wredundant-decls
-Wnested-externs -Wundef -L../../exports/lib xkbcomp.o xkbscan.o expr.o
vmod.o indicators.o misc.o alias.o keymap.o keycodes.o keytypes.o
compat.o action.o symbols.o geometry.o xkbpath.o listing.o
       xkbparse.o parseutils.o utils.o -lxkbfile -lXext -lX11
-Wl,-rpath-link,../../exports/lib
daniels@nanasawa:~/canonical/xfree86/xfree86-4.3.0.dfsg.1/build-tree/xc/programs/xkbcomp%

It's been a while since I've filed a gcc bug, so please let me know what sort of
debug output I need to give you.

Revision history for this message
Daniel Stone (daniels) wrote :

Also occurs (100% reproducibly) on xc/programs/xtrap/xtrapstats.c.

I'm running on an AthlonXP 2400+ (standard clockspeed, well-cooled, all that),
good Kingston RAM that checked out fine with memtest86. The only real
derivation is that I'm running a self-compiled 2.6.9-rc1-mm1, as I need proper
XFS support, and 2.6.7 hung with my media reader plugged into the USB port (will
check if this still occurs with 2.6.8.1); however, I wouldn't believe this would
affect anything, as it only affects the very same specific files (static across
many unpacks from different .orig tarballs -- initially I thought it was my bad,
deleted the orig, and downloaded it again).

Revision history for this message
Daniel Stone (daniels) wrote :

Yep, local problem; 2.6.8.1-1 works fine. Something I encountered later on in
the build[0] made me think it was the kernel, and after putting 2.6.8.1-1 in,
the XFS braindamage in there is a lot less bad than in .9-rc1-mm1, in which it
encounters random, reproducible(!!) short reads. Go figure.

[0]: commonregs.h would come up as being 'shorter than expected' from gcc(?!?),
and sure enough, even after repeated wget'ing from the full file, it would
always end up reading shorter than expected.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.