This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix wrong use-after-scope sanitization for omp variable (PR sanitizer/85081).


On 03/28/2018 04:17 PM, Jakub Jelinek wrote:
On Wed, Mar 28, 2018 at 04:14:45PM +0200, Martin Liška wrote:
Hi.

I'm sending Jakub's patch, where I removed the guard in asan_poison_variable.
Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.

Martin

gcc/ChangeLog:

2018-03-28  Jakub Jelinek  <jakub@redhat.com>
	    Martin Liska  <mliska@suse.cz>

	PR sanitizer/85081
	* gimplify.c (asan_poison_variable): Don't do the check for
	gimplify_omp_ctxp here.
	(gimplify_decl_expr): Do it here.
	(gimplify_target_expr): Likewise.

gcc/testsuite/ChangeLog:

2018-03-28  Jakub Jelinek  <jakub@redhat.com>
	    Martin Liska  <mliska@suse.cz>

	PR sanitizer/85081
	* g++.dg/asan/pr85081.C: New test.

I guess it is ok for trunk for now, but for stage1 I'd like analysis on why
you've added that !gimplify_omp_ctxp stuff at all.  E.g. for local vars
inside of OpenMP/OpenACC constructs there should be no reason why they
couldn't be unpoisoned and poisoned inside of the OpenMP region.

	Jakub


Good, I've just installed the patch. I'll write that to my TODO list for next stage1.

Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]