On 10/24/2014 02:43 PM, Eric Botcazou wrote:
some time ago, Andrew wrote a patch that fixes PR58867
(http://patchwork.ozlabs.org/patch/286866/), but for some reasons it
wasn't committed to trunk.
This is resurrected Andrew's patch, extended to support Tsan testsuite.
This patch broke --disable-libsanitizer though, i.e. you now get gazillions of
sanitizer failures in the C and C++ testsuites.
Hi,
do you have any other (system) version of GCC, configured without
--disable-libsanitizer? If so, perhaps your GCC links with system
asan_preinit.o and links dummy int main () { return 0; } in
check_effective_target_fsanitize_address successfully, but fails to find
libasan.so in execution tests because LD_LIBRARY_PATH does not contain
any path to libasan.so.2.
If so, I see two ways to fix this:
1) Add path to system libs in LD_LIBRARY_PATH explicitly.
2) Make check_effective_target_fsanitize_address not only link dummy
executable, but also run it and verify that exit code equals zero.
-Maxim