]> gcc.gnu.org Git - 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:36:04 +0000 (09:36 +0200)
commitbe4faae87a06e8f9165623f1f3eab4ccb89b93a2
treeb5b2371701aa4c5c3934c43526a869e1e836cfb8
parentd038404096a03cdbb2702c0ea147ab9b1a6134fb
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/pr91441.c: Likewise.
* gcc.dg/pr96260.c: Likewise.
* gcc.dg/pr96307.c: Likewise.

* g++.dg/abi/anon4.C: Likewise.
gcc/testsuite/g++.dg/abi/anon4.C
gcc/testsuite/gcc.dg/pr91441.c
gcc/testsuite/gcc.dg/pr96260.c
gcc/testsuite/gcc.dg/pr96307.c
gcc/testsuite/lib/target-supports.exp
This page took 0.067969 seconds and 6 git commands to generate.