]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix no_fsanitize_address effective target
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 21 Sep 2021 07:25:47 +0000 (09:25 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Tue, 21 Sep 2021 07:29:39 +0000 (09:29 +0200)
commit6e6bf4cd21af39a7923bae007517ab43a4c3b36a
tree56e59e96253a468ac4913893724b51ebf5a7db85
parent417ea5c02cef7f000e66d1af22b066c2c1cda047
Fix no_fsanitize_address effective target

The implementation of the no_fsanitize_address effective target was copied
from asan-dg.exp without realizing that it does not work outside of this
context (there is a comment explaining why).  As a consequence, it always
returns 0, so for example the directive in gnat.dg/asan1.adb:

{ dg-skip-if "no address sanitizer" { no_fsanitize_address } }

does not work.  This led some people to add the nonsensical:

{ dg-require-effective-target no_fsanitize_address }

to sanitizer tests, e.g. g++.dg/warn/uninit-pr93100.C, thus disabling them
everywhere instead of just for the problematic targets.

gcc/testsuite/
* lib/target-supports.exp (no_fsanitize_address): Add missing bits.
* gcc.dg/uninit-pr93100.c: Skip if no_fsanitize_address.
* gcc.dg/pr91441.c: Likewise.
* gcc.dg/pr96260.c: Likewise.
* gcc.dg/pr96307.c: Likewise.
* g++.dg/warn/uninit-pr93100.C: Likewise.
* gnat.dg/asan1.adb: Likewise.

* gcc.dg/Wstringop-overflow-70.c: Adjust for SPARC.
* g++.dg/abi/anon4.C: Likewise.
gcc/testsuite/g++.dg/abi/anon4.C
gcc/testsuite/g++.dg/warn/uninit-pr93100.C
gcc/testsuite/gcc.dg/Wstringop-overflow-70.c
gcc/testsuite/gcc.dg/pr91441.c
gcc/testsuite/gcc.dg/pr96260.c
gcc/testsuite/gcc.dg/pr96307.c
gcc/testsuite/gcc.dg/uninit-pr93100.c
gcc/testsuite/gnat.dg/asan1.adb
gcc/testsuite/lib/target-supports.exp