diff options
author | Tom de Vries <tdevries@suse.de> | 2025-01-09 13:14:57 +0100 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2025-01-09 13:14:57 +0100 |
commit | dabe45ce0c3b5a04029164646024e7c99d4b8649 (patch) | |
tree | 487c050e102aec0bdd60912736fb818fe4eb0efe /gdb/testsuite | |
parent | 956bbb55818489eb9f154dab35302b71c576e2ea (diff) | |
download | gdb-dabe45ce0c3b5a04029164646024e7c99d4b8649.zip gdb-dabe45ce0c3b5a04029164646024e7c99d4b8649.tar.gz gdb-dabe45ce0c3b5a04029164646024e7c99d4b8649.tar.bz2 |
[gdb/testsuite] Run one more test-case with ASAN_OPTIONS=verify_asan_link_order=0
After building gdb with asan, and running test-case
gdb.trace/basic-libipa.exp, I got:
...
(gdb) run ^M
Starting program: basic-libipa ^M
[Thread debugging using libthread_db enabled]^M
Using host libthread_db library "/lib64/libthread_db.so.1".^M
==7705==ASan runtime does not come first in initial library list; you should \
either link runtime to your application or manually preload it with \
LD_PRELOAD.^M
[Inferior 1 (process 7705) exited with code 01]^M
(gdb) FAIL: gdb.trace/basic-libipa.exp: runto: run to main
...
Fix this in the same way as in commit 75948417af8 ("[gdb/testsuite] Run two
test-cases with ASAN_OPTIONS=verify_asan_link_order=0").
Tested on x86_64-linux.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/gdb.trace/basic-libipa.exp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.trace/basic-libipa.exp b/gdb/testsuite/gdb.trace/basic-libipa.exp index c49192a..dcde297 100644 --- a/gdb/testsuite/gdb.trace/basic-libipa.exp +++ b/gdb/testsuite/gdb.trace/basic-libipa.exp @@ -30,11 +30,21 @@ set libipa [get_in_proc_agent] gdb_download_shlib $libipa -if { [prepare_for_testing "failed to prepare" $testfile $srcfile \ +if { [build_executable "failed to prepare" $testfile $srcfile \ [list debug shlib=$libipa]] } { return -1 } +save_vars { env(ASAN_OPTIONS) } { + # Prevent address sanitizer error: + # ASan runtime does not come first in initial library list; you should + # either link runtime to your application or manually preload it with + # LD_PRELOAD. + set_sanitizer_default ASAN_OPTIONS verify_asan_link_order 0 + + clean_restart $binfile +} + if {![runto_main]} { return -1 } |