From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 37364 invoked by alias); 8 Nov 2016 12:10:23 -0000 Mailing-List: contact jit-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Subscribe: Sender: jit-owner@gcc.gnu.org Received: (qmail 37343 invoked by uid 89); 8 Nov 2016 12:10:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.8 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*i:sk:26e56fb, H*f:sk:26e56fb, scanned, 20161108 X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com X-Authentication-Warning: tucnak.zalov.cz: jakub set sender to jakub@redhat.com using -f Date: Fri, 01 Jan 2016 00:00:00 -0000 From: Jakub Jelinek To: Martin =?utf-8?B?TGnFoWth?= Cc: David Malcolm , Marek Polacek , GCC Patches , jit@gcc.gnu.org Subject: Re: [PATCH] use-after-scope fallout Message-ID: <20161108121006.GU3541@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20161102143511.GV3541@tucnak.redhat.com> <20161104093254.GS3541@tucnak.redhat.com> <0e0fd0f9-1c7d-ac9e-8dfc-9349611b5efe@suse.cz> <59fde5a4-3633-5fc8-daa0-ed485d75a5db@suse.cz> <1478534833.7673.11.camel@redhat.com> <20161107161741.GN3541@tucnak.redhat.com> <20161108094052.GT3541@tucnak.redhat.com> <26e56fb7-f60f-4438-d118-e4346d43305c@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <26e56fb7-f60f-4438-d118-e4346d43305c@suse.cz> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 08 Nov 2016 12:10:11 +0000 (UTC) X-SW-Source: 2016-q4/txt/msg00012.txt.bz2 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 > Date: Mon, 7 Nov 2016 14:49:00 +0100 > Subject: [PATCH] use-after-scope fallout > > gcc/testsuite/ChangeLog: > > 2016-11-08 Martin Liska > > 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 > > 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