diff options
author | Martin Liska <mliska@suse.cz> | 2021-04-12 10:49:41 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2021-04-12 13:34:02 +0200 |
commit | 598359f627dec765eb74e31d9e96901a68bbfb97 (patch) | |
tree | f77278a61ea65b3eb83c9e14f0120f0bfe42c6d0 /gcc/gimplify.c | |
parent | 91dd7954c44b201aa3b16e66b18d7a5df00fded9 (diff) | |
download | gcc-598359f627dec765eb74e31d9e96901a68bbfb97.zip gcc-598359f627dec765eb74e31d9e96901a68bbfb97.tar.gz gcc-598359f627dec765eb74e31d9e96901a68bbfb97.tar.bz2 |
ASAN: do not unpoison in OpenMP context
gcc/ChangeLog:
PR sanitizer/99877
* gimplify.c (gimplify_expr): Right now, we unpoison all
variables before a goto <dest>. We should not do it if we are
in a omp context.
gcc/testsuite/ChangeLog:
PR sanitizer/99877
* g++.dg/asan/pr99877.C: New test.
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 1f417a5..b65106b 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -14328,7 +14328,8 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, Doing so would prevent us from reporting a false positives. */ if (asan_poisoned_variables && asan_used_labels != NULL - && asan_used_labels->contains (label)) + && asan_used_labels->contains (label) + && !gimplify_omp_ctxp) asan_poison_variables (asan_poisoned_variables, false, pre_p); break; |