From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 48681 invoked by alias); 7 Nov 2016 10:08:23 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 48668 invoked by uid 89); 7 Nov 2016 10:08:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.7 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=upcoming X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 07 Nov 2016 10:08:20 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C2FD3332F98; Mon, 7 Nov 2016 10:08:19 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-204-19.brq.redhat.com [10.40.204.19]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uA7A8IeX029156 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 7 Nov 2016 05:08:19 -0500 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id uA7A8GIp001192; Mon, 7 Nov 2016 11:08:17 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id uA7A8F0n001191; Mon, 7 Nov 2016 11:08:15 +0100 Date: Mon, 07 Nov 2016 10:08:00 -0000 From: Jakub Jelinek To: Martin =?utf-8?B?TGnFoWth?= Cc: Marek Polacek , GCC Patches Subject: Re: [PATCH, RFC] Introduce -fsanitize=use-after-scope (v3) Message-ID: <20161107100815.GG3541@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <3f0181a4-e1b2-406f-7cf1-e63e9e9824fe@suse.cz> <20161102095926.GM3541@tucnak.redhat.com> <20161102101053.GN3541@tucnak.redhat.com> <20161102142028.GQ5939@redhat.com> <8ac49efe-83af-933b-2aa5-f4b22972fa6a@suse.cz> <20161102143511.GV3541@tucnak.redhat.com> <20161104093254.GS3541@tucnak.redhat.com> <0e0fd0f9-1c7d-ac9e-8dfc-9349611b5efe@suse.cz> <59fde5a4-3633-5fc8-daa0-ed485d75a5db@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <59fde5a4-3633-5fc8-daa0-ed485d75a5db@suse.cz> User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg00577.txt.bz2 On Mon, Nov 07, 2016 at 11:03:11AM +0100, Martin Liška wrote: > Hello. > > After discussion with Jakub, I'm resending new version of the patch, where I changed following: > 1) gimplify_ctxp->live_switch_vars is used to track variables introduced in switch_expr. Every time > a case_label_expr is seen, these are unpoisoned. It's quite conservative, however it covers all > corner cases on can come up with. Compared to clang, we are much more precise in switch statements > where a variable liveness crosses label boundary. > 2) I found a bug where ASAN_CHECK was optimized out due to missing check of IFN_ASAN_MARK internal fn. > Test was added for that. > 3) Multiple switch tests have been added, which is going to be sent in upcoming email. > > Patch can bootstrap on ppc64le-redhat-linux and survives regression tests (+ asan bootstrap finishes > successfully). Ok for trunk. Hopefully we can resolve the most common cases for switch incrementally, either still during stage1 or early in stage3. Jakub