aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2024-02-01 13:13:06 +0100
committerRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2024-02-01 13:13:06 +0100
commit099d53e5b5404532e8910d1430f3942c4f07976c (patch)
tree886a6e46b7aef83767fb3bc985ab6243d8f7b96d /libcpp
parent5b9b395b8561efe797842b5f1c435d538d0a5de4 (diff)
downloadgcc-099d53e5b5404532e8910d1430f3942c4f07976c.zip
gcc-099d53e5b5404532e8910d1430f3942c4f07976c.tar.gz
gcc-099d53e5b5404532e8910d1430f3942c4f07976c.tar.bz2
Link shared libasan with -z now on Solaris
g++.dg/asan/default-options-1.C FAILs on Solaris/SPARC and x86: FAIL: g++.dg/asan/default-options-1.C -O0 execution test FAIL: g++.dg/asan/default-options-1.C -O1 execution test FAIL: g++.dg/asan/default-options-1.C -O2 execution test FAIL: g++.dg/asan/default-options-1.C -O2 -flto execution test FAIL: g++.dg/asan/default-options-1.C -O2 -flto -flto-partition=none execution test FAIL: g++.dg/asan/default-options-1.C -O3 -g execution test FAIL: g++.dg/asan/default-options-1.C -Os execution test The failure is always the same: AddressSanitizer: CHECK failed: asan_rtl.cpp:397 "((!AsanInitIsRunning() && "ASan init calls itself!")) != (0)" (0x0, 0x0) (tid=1) This happens because libasan makes unportable assumptions about initialization order that don't hold on Solaris. The problem has already been fixed in clang by [Driver] Link shared asan runtime lib with -z now on Solaris/x86 https://reviews.llvm.org/D156325 where it was way more prevalent. This patch applies the same fix to gcc. Tested on i386-pc-solaris2.11 (ld and gld) and sparc-sun-solaris2.11. 2024-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> gcc: * config/sol2.h (LIBASAN_EARLY_SPEC): Add -z now unless -static-libasan. Add missing whitespace.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions