http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52042
Bug #: 52042 Summary: libitm.c/clone-1.c and libitm.c/stackundo.c execution tests are not pie compatible Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libitm AssignedTo: unassig...@gcc.gnu.org ReportedBy: howa...@nitro.med.uc.edu On x86_64-apple-darwin11, the libitm testsuite failures... FAIL: libitm.c/clone-1.c execution test FAIL: libitm.c/stackundo.c execution test are seen at both -m32/-m64. These test cases don't fail within Apple gdb due to its default disabling of aslr. If aslr is enabled within gdb, the following backtraces are seen... gdb ./stackundo.exe GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Thu Nov 3 21:59:02 UTC 2011) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries .... done (gdb) set disable-aslr off (gdb) r Starting program: /sw/src/fink.build/gcc47-4.7.0-1/darwin_objdir/x86_64-apple-darwin11.2.0/libitm/testsuite/stackundo.exe Reading symbols for shared libraries + done Reading symbols for shared libraries ++++........................ done Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x00000001000010b0 clone_entry_compare (a=0x1000010a0, b=0x1000010b0) at ../../../gcc-4.7-20120126/libitm/clone.cc:105 105 if (aa->orig < bb->orig) (gdb) bt #0 clone_entry_compare (a=0x1000010a0, b=0x1000010b0) at ../../../gcc-4.7-20120126/libitm/clone.cc:105 #1 0x00007fff8ddd4894 in _qsort () #2 0x00000001016948c6 in _ITM_registerTMCloneTable (xent=0x1000010a0, size=2) at ../../../gcc-4.7-20120126/libitm/clone.cc:155 Current language: auto; currently c++ gdb ./clone-1.exeGNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Thu Nov 3 21:59:02 UTC 2011)Copyright 2004 Free Software Foundation, Inc.GDB is free software, covered by the GNU General Public License, and you arewelcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries .... done (gdb) set disable-aslr off (gdb) r Starting program: /sw/src/fink.build/gcc47-4.7.0-1/darwin_objdir/x86_64-apple-darwin11.2.0/libitm/testsuite/clone-1.exe Reading symbols for shared libraries + done Reading symbols for shared libraries ++++........................ done Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x00000001000010a8 clone_entry_compare (a=0x100001098, b=0x1000010a8) at ../../../gcc-4.7-20120126/libitm/clone.cc:105 105 if (aa->orig < bb->orig) (gdb) bt #0 clone_entry_compare (a=0x100001098, b=0x1000010a8) at ../../../gcc-4.7-20120126/libitm/clone.cc:105 #1 0x00007fff8ddd4894 in _qsort () #2 0x000000010299a8c6 in _ITM_registerTMCloneTable (xent=0x100001098, size=2) at ../../../gcc-4.7-20120126/libitm/clone.cc:155 Current language: auto; currently c++ Using built-in specs. COLLECT_GCC=gcc-fsf-4.7 COLLECT_LTO_WRAPPER=/sw/lib/gcc4.7/libexec/gcc/x86_64-apple-darwin11.2.0/4.7.0/lto-wrapper Target: x86_64-apple-darwin11.2.0 Configured with: ../gcc-4.7-20120126/configure --prefix=/sw --prefix=/sw/lib/gcc4.7 --mandir=/sw/share/man --infodir=/sw/lib/gcc4.7/info --with-build-config=bootstrap-lto --enable-stage1-languages=c,lto --enable-languages=c,c++,fortran,lto,objc,obj-c++,java --with-gmp=/sw --with-libiconv-prefix=/sw --with-ppl=/sw --with-cloog=/sw --with-mpc=/sw --with-system-zlib --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib --program-suffix=-fsf-4.7 --enable-checking=yes --enable-cloog-backend=isl Thread model: posix gcc version 4.7.0 20120126 (experimental) (GCC)