On Tue, Jun 03, 2014 at 10:19:48AM +0400, Yury Gribov wrote: > >I took that patch and applied it to the gcc sources, > >but I still see the error on ppc: > >... > >[bergner@makalu-lp1 asan]$ > >LD_LIBRARY_PATH=:/home/bergner/gcc/build/gcc-fsf-mainline-asan-debug-3/gcc:/home/bergner/gcc/build/gcc-fsf-mainline-asan-debug-3/gcc/32:/home/bergner/gcc/build/gcc-fsf-mainline-asan-debug-3/powerpc64-linux/32/libsanitizer/asan/.libs::/home/bergner/gcc/build/gcc-fsf-mainline-asan-debug-3/gcc:/home/bergner/gcc/build/gcc-fsf-mainline-asan-debug-3/gcc/32:/home/bergner/gcc/build/gcc-fsf-mainline-asan-debug-3/powerpc64-linux/32/libsanitizer/asan/.libs: > > ldd ./asan-interface-1.exe > > linux-vdso32.so.1 => (0x00100000) > > libm.so.6 => /lib/power8/libm.so.6 (0x0ff00000) > > libasan.so.1 => > > /home/bergner/gcc/build/gcc-fsf-mainline-asan-debug-3/powerpc64-linux/32/libsanitizer/asan/.libs/libasan.so.1 > > (0x0f930000) > > Now check indeed seems to be useful: libasan should be the first > library in the list when -fsanitize=address flag is present. Are > compiler specs for Power somehow special?
-fsanitize=address should insert -lasan quite early on the linker command line, please try to cut'n'paste the command line from testsuite/g++/g++.log and add -v to see what is passed to the linker. Perhaps the linker reorders the libraries? Or do you have LD_PRELOAD? Jakub