This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug sanitizer/85081] [7/8 Regression] Sanitizer error with references in vectorized/parallel for-loop
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 27 Mar 2018 18:14:54 +0000
- Subject: [Bug sanitizer/85081] [7/8 Regression] Sanitizer error with references in vectorized/parallel for-loop
- Auto-submitted: auto-generated
- References: <bug-85081-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85081
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2018-03-27
Ever confirmed|0 |1
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Martin, this is because of:
/* When within an OMP context, do not emit ASAN_MARK internal fns. */
if (gimplify_omp_ctxp)
return;
in asan_poison_variable. Not really sure why exactly it has been added, but if
we can't emit the ASAN_UNPOISON, we can't emit the corresponding ASAN_POISON
either.
So something like:
--- gcc/gimplify.c.jj 2018-03-16 13:43:14.831910333 +0100
+++ gcc/gimplify.c 2018-03-27 20:11:27.680195380 +0200
@@ -1689,7 +1689,8 @@ gimplify_decl_expr (tree *stmt_p, gimple
&& !TREE_STATIC (decl)
&& !DECL_HAS_VALUE_EXPR_P (decl)
&& DECL_ALIGN (decl) <= MAX_SUPPORTED_STACK_ALIGNMENT
- && dbg_cnt (asan_use_after_scope))
+ && dbg_cnt (asan_use_after_scope)
+ && !gimplify_omp_ctxp)
{
asan_poisoned_variables->add (decl);
asan_poison_variable (decl, false, seq_p);
@@ -6614,7 +6615,8 @@ gimplify_target_expr (tree *expr_p, gimp
}
if (asan_poisoned_variables
&& DECL_ALIGN (temp) <= MAX_SUPPORTED_STACK_ALIGNMENT
- && dbg_cnt (asan_use_after_scope))
+ && dbg_cnt (asan_use_after_scope)
+ && !gimplify_omp_ctxp)
{
tree asan_cleanup = build_asan_poison_call_expr (temp);
if (asan_cleanup)
fixes it from me, but not really sure about the reasons why the above check is
in there. Martin?