Miscompilation of glibc with CVS mainline
Andreas Jaeger
aj@suse.de
Wed Jan 1 13:37:00 GMT 2003
GCC CVS mainline miscompiles glibc on i686-linux-gnu. The actual
error I noticed is:
CPP='/opt/gcc/3.3-devel/bin/gcc -E -x c-header' /builds/glibc/test-libc/elf/ld-linux.so.2 --library-path /builds/glibc/test-libc:/builds/glibc/test-libc/math:/builds/glibc/test-libc/elf:/builds/glibc/test-libc/dlfcn:/builds/glibc/test-libc/nss:/builds/glibc/test-libc/nis:/builds/glibc/test-libc/rt:/builds/glibc/test-libc/resolv:/builds/glibc/test-libc/crypt:/builds/glibc/test-libc/linuxthreads /builds/glibc/test-libc/sunrpc/rpcgen -Y ../scripts -c rpcsvc/bootparam_prot.x -o /builds/glibc/test-libc/sunrpc/xbootparam_prot.T
make[2]: *** [/builds/glibc/test-libc/sunrpc/xbootparam_prot.stmp] Segmentation fault
make[2]: Leaving directory `/cvs/libc/sunrpc'
To track down the failure, I used Janis' script and noticed that it
fails since the merge from the 3_4-basic-improvement branch.
Searching that branch I found this patch as beeing the problem:
+2002-10-07 Richard Henderson <rth@redhat.com>
+
+ * cse.c (fixed_base_plus_p): Turn FIXED_BASE_PLUS_P into a
+ function; cleanup PLUS case by using recursion. Update all users.
+ (NONZERO_BASE_PLUS_P): Remove.
+ (find_comparison_args): Use rtx_addr_can_trap_p instead.
+ (fold_rtx): Use nonzero_address_p.
+ * rtl.h (nonzero_address_p): Declare.
+ * rtlanal.c (rtx_varies_p): Handle ADDRESSOF.
+ (rtx_addr_can_trap_p): Likewise.
+ (nonzero_address_p): New.
+ * simplify-rtx.c (NONZERO_BASE_PLUS_P): Remove.
+ (simplify_relational_operation): Use nonzero_address_p.
I haven't been able to figure out which file in glibc is miscompiled
and therefore like to ask for an additional review of that patch
again.
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj
More information about the Gcc
mailing list