From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43796 invoked by alias); 26 Jan 2017 08:57:37 -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 41071 invoked by uid 89); 26 Jan 2017 08:57:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=**a, *a, asan.exp, UD:asan.exp X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 26 Jan 2017 08:57:25 +0000 Received: from svr-orw-fem-02x.mgc.mentorg.com ([147.34.96.206] helo=SVR-ORW-FEM-02.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1cWfrt-0001wm-AI from Thomas_Schwinge@mentor.com ; Thu, 26 Jan 2017 00:57:21 -0800 Received: from tftp-cs (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.3.224.2; Thu, 26 Jan 2017 00:57:20 -0800 Received: by tftp-cs (Postfix, from userid 49978) id 6B02CC22DE; Thu, 26 Jan 2017 00:57:20 -0800 (PST) From: Thomas Schwinge To: Martin =?utf-8?Q?Li=C5=A1ka?= , Jakub Jelinek CC: Richard Biener , GCC Patches Subject: Re: [PATCH] Speed-up use-after-scope (re-writing to SSA) (version 2) In-Reply-To: <4e0e7dbe-e770-bc77-b25f-6f38f5125e89@suse.cz> References: <4ec48432-9df6-154a-1b13-065b9772cbbf@suse.cz> <20161222172140.GF21933@tucnak> <29d32a7c-a95d-ddb1-d64e-ae8f659d3a4b@suse.cz> <20170116142025.GO1867@tucnak> <7e7f795d-a7a7-584e-8c77-61ea01207c40@suse.cz> <20170117164721.GE1867@tucnak> <20170119163358.GQ1867@tucnak> <5ca02d10-8023-63ea-1669-e5f56f08ec67@suse.cz> <20170120142717.GT1867@tucnak> <4e0e7dbe-e770-bc77-b25f-6f38f5125e89@suse.cz> User-Agent: Notmuch/0.9-125-g4686d11 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Thu, 26 Jan 2017 09:04:00 -0000 Message-ID: <877f5ici6t.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-SW-Source: 2017-01/txt/msg02016.txt.bz2 Hi! On Mon, 23 Jan 2017 10:19:33 +0100, Martin Li=C5=A1ka wrot= e: > --- a/gcc/testsuite/gcc.dg/asan/use-after-scope-3.c > +++ b/gcc/testsuite/gcc.dg/asan/use-after-scope-3.c > @@ -1,5 +1,6 @@ > // { dg-do run } > // { dg-shouldfail "asan" } > +// { dg-additional-options "-O0" } As these tests per "gcc/testsuite/gcc.dg/asan/asan.exp" are run with "gcc-dg-runtest", which will "cycle through a list of optimization options as c-torture does", is it really appropriate to hard-code "-O0" here? Shouldn't instead be all testing be "dg-skip"ped (or similar) unless "-O0" is in effect? > --- a/gcc/testsuite/gcc.dg/asan/use-after-scope-9.c > +++ b/gcc/testsuite/gcc.dg/asan/use-after-scope-9.c > @@ -1,5 +1,6 @@ > // { dg-do run } > // { dg-shouldfail "asan" } > +// { dg-additional-options "-O2 -fdump-tree-asan1" } Likewise. (I didn't check any other such test cases.) > +// { dg-final { scan-tree-dump-times "=3D ASAN_POISON \\(\\)" 1 "asan1" = } } > // { dg-output "ERROR: AddressSanitizer: stack-use-after-scope on addres= s.*(\n|\r\n|\r)" } > // { dg-output "READ of size .*" } > // { dg-output ".*'a' <=3D=3D Memory access at offset \[0-9\]* is inside= this variable.*" } This is PASS for most of all tortute test options, but for "-O2 -flto -fuse-linker-plugin -fno-fat-lto-objects" will produce: PASS: gcc.dg/asan/use-after-scope-9.c -O2 -flto -fuse-linker-plugin -= fno-fat-lto-objects (test for excess errors) PASS: gcc.dg/asan/use-after-scope-9.c -O2 -flto -fuse-linker-plugin -= fno-fat-lto-objects execution test PASS: gcc.dg/asan/use-after-scope-9.c -O2 -flto -fuse-linker-plugin -= fno-fat-lto-objects output pattern test, ERROR: AddressSanitizer: stack-us= e-after-scope on address.*( | |^M)READ of size .*.*'a' <=3D=3D Memory access at offset [0-9]* is insi= de this variable.* {+UNRESOLVED: gcc.dg/asan/use-after-scope-9.c -O2 -flto -fuse-linker-= plugin -fno-fat-lto-objects scan-tree-dump-times asan1 "=3D ASAN_POISON \= \(\\)" 1+} (Notice UNRESOLVED.) Is this to be expected/skipped/fixed? Gr=C3=BC=C3=9Fe Thomas