On Tue, Nov 08, 2016 at 01:00:19PM +0100, Martin Liška wrote:
> This is fallout fix where I changed:
>
> 1) Fix ICE for lambda functions (added test-case: use-after-scope-4.C)
> 2) Fix ICE in gimplify_switch_expr, at gimplify.c:2269 (fixed by not adding
> artificial variables)
> 3) PR testsuite/78242 - I basically removed the test (not interesting)
> 4) LEAF and NOTHROW flags are properly set on ASAN {un}poison functions
> 5) dbg_cnt has been added
> 6) use-after-scope-types-4.C - scanned pattern is updated to work on i686
>
> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
>
> Ready to be installed?
> Martin
> >From 36eb4a8b3542729c9c428ac319d8422bea677869 Mon Sep 17 00:00:00 2001
> From: marxin <[email protected]>
> Date: Mon, 7 Nov 2016 14:49:00 +0100
> Subject: [PATCH] use-after-scope fallout
>
> gcc/testsuite/ChangeLog:
>
> 2016-11-08 Martin Liska <[email protected]>
>
> PR testsuite/78242
> * g++.dg/asan/use-after-scope-4.C: New test.
> * g++.dg/asan/use-after-scope-types-4.C: Update scanned pattern.
> * gcc.dg/asan/use-after-scope-8.c: Remove.
>
> gcc/ChangeLog:
>
> 2016-11-08 Martin Liska <[email protected]>
>
> PR testsuite/78242
> * dbgcnt.def: Add new debug counter asan_use_after_scope.
> * gimplify.c (gimplify_decl_expr): Do not sanitize vars
> with a value expr. Do not add artificial variables to
> live_switch_vars. Use the debug counter.
> (gimplify_target_expr): Use the debug counter.
> * internal-fn.def: Remove ECF_TM_PURE from ASAN_MARK builtin.
> * sanitizer.def: Set ATTR_NOTHROW_LEAF_LIST to
> BUILT_IN_ASAN_CLOBBER_N and BUILT_IN_ASAN_UNCLOBBER_N.
Ok. BTW, in stage3 please also check if/how nested functions (C and
fortran) work, I bet if you ASAN_MARK some vars and then
tree-nested.c moves them into an artificial struct that things might
not work 100% properly (e.g. would there be a guarantee that it is
unpoisoned upon function exit)?
Jakub