Re: [PATCH] ASAN: handle addressable params (PR sanitize/81040).

2017-07-04 Thread Jakub Jelinek
On Fri, Jun 30, 2017 at 11:21:48AM +0200, Martin Liška wrote: > --- /dev/null > +++ b/gcc/testsuite/g++.dg/asan/function-argument-3.C > @@ -0,0 +1,27 @@ > +// { dg-do run } > +// { dg-shouldfail "asan" } > + > +typedef int v4si __attribute__ ((vector_size (16))); > + > +static __attribute__

Re: [PATCH] ASAN: handle addressable params (PR sanitize/81040).

2017-06-30 Thread Jakub Jelinek
On Fri, Jun 30, 2017 at 11:21:48AM +0200, Martin Liška wrote: > @@ -858,6 +864,132 @@ sanitize_asan_mark_poison (void) > } > } > > +/* Rewrite all usages of tree OP which is a PARM_DECL with a VAR_DECL > + that is it's DECL_VALUE_EXPR. */ > + > +static tree > +rewrite_usage_of_param

Re: [PATCH] ASAN: handle addressable params (PR sanitize/81040).

2017-06-30 Thread Martin Liška
aken, but ADDRESSABLE bit not set grokfield (location_t loc, ^ PHI argument for PHI node iftmp.2774_27 = PHI <(16), 0B(61), (54)> during GIMPLE pass: sanopt ../../gcc/c/c-decl.c:7525:1: internal compiler error: verify_ssa failed 0x115356db verify_ssa(bool, bool) ../../gcc

Re: [PATCH] ASAN: handle addressable params (PR sanitize/81040).

2017-06-29 Thread Jakub Jelinek
On Tue, Jun 20, 2017 at 03:06:56PM +0200, Martin Liška wrote: > +/* Rewrite all usages of tree OP which is a PARM_DECL with a VAR_DECL > + that is it's DECL_VALUE_EXPR. */ > + > +static tree > +rewrite_usage_of_param (tree *op, int *walk_subtrees, void *) > +{ > + if (TREE_CODE (*op) ==

Re: [PATCH] ASAN: handle addressable params (PR sanitize/81040).

2017-06-28 Thread Martin Liška
PING^1 On 06/20/2017 03:06 PM, Martin Liška wrote: > On 06/20/2017 11:32 AM, Jakub Jelinek wrote: >> On Tue, Jun 20, 2017 at 11:23:36AM +0200, Martin Liška wrote: Then something needs to be done for debugging too. If it is without VTA, then probably just having DECL_VALUE_EXPR is good

Re: [PATCH] ASAN: handle addressable params (PR sanitize/81040).

2017-06-20 Thread Martin Liška
def, you shouldn't run into this. > > Jakub > Good I fixed that in v2, that passes regression tests. Ale objections should be resolved in the version. Ready for trunk? Martin >From ed5da705250c3015e964de8d23d1aa3d0056012a Mon Sep 17 00:00:00 2001 From: marxin <mli...

Re: [PATCH] ASAN: handle addressable params (PR sanitize/81040).

2017-06-20 Thread Jakub Jelinek
On Tue, Jun 20, 2017 at 11:23:36AM +0200, Martin Liška wrote: > > Then something needs to be done for debugging too. If it is without VTA, > > then probably just having DECL_VALUE_EXPR is good enough, otherwise > > (VTA) you probably don't want that (or can reset it at that point), but > >

Re: [PATCH] ASAN: handle addressable params (PR sanitize/81040).

2017-06-20 Thread Martin Liška
On 06/19/2017 04:13 PM, Jakub Jelinek wrote: > On Mon, Jun 19, 2017 at 03:50:42PM +0200, Martin Liška wrote: >> @@ -858,6 +862,117 @@ sanitize_asan_mark_poison (void) >> } >> } >> > > Missing function comment. > >> +static tree >> +rewrite_usage_of_param (tree *op, int *walk_subtrees,

Re: [PATCH] ASAN: handle addressable params (PR sanitize/81040).

2017-06-19 Thread Jakub Jelinek
On Mon, Jun 19, 2017 at 03:50:42PM +0200, Martin Liška wrote: > @@ -858,6 +862,117 @@ sanitize_asan_mark_poison (void) > } > } > Missing function comment. > +static tree > +rewrite_usage_of_param (tree *op, int *walk_subtrees, void *data) > +{ > + struct walk_stmt_info *wi = (struct

[PATCH] ASAN: handle addressable params (PR sanitize/81040).

2017-06-19 Thread Martin Liška
0 Subject: [PATCH] ASAN: handle addressable params (PR sanitize/81040). gcc/testsuite/ChangeLog: 2017-06-19 Martin Liska <mli...@suse.cz> PR sanitize/81040 * g++.dg/asan/function-argument-1.C: New test. * g++.dg/asan/function-argument-2.C: New test. * g++.dg/asan/function-argument-3.C: