From patchwork Fri Jan 10 07:49:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: max X-Patchwork-Id: 309172 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B2F5A2C009B for ; Fri, 10 Jan 2014 18:50:04 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; q=dns; s=default; b=lOBB/9LQvem8VyEqS fbaBQBsbx+e48D8/5Bpfg9WsbCslUkEReQV0qyjhOsAuNsf8hVE1Eln8Xbbp2HuU EiQBfILkXguqgiZ9VlNEKthSv7W50Cm08O85HrDJ4phue705fe+bZ5DtPGxblDSn a9BZ1oesmCU2MtXD8cayVHZdGo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; s=default; bh=Xq61erD1XMHFdvIGNmqE0rd 8Nmw=; b=ZT1hgEs4FGgoRkGVNI4odPd/6FOhfmU2avluO7pdb64yi2v63RLh16z Xjnx8OSZ2Tr9JSbyfhTMDcdGtkugl+WPOHth1ZozkBFJi0ZRtwKwy+56mzG34k1h tdb9iQikl8WN9Gt3BBdEju4eqtexO3nTSd2Ns/dYE2RVW2CB4QUQ= Received: (qmail 19496 invoked by alias); 10 Jan 2014 07:49:51 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 19410 invoked by uid 89); 10 Jan 2014 07:49:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mailout1.w1.samsung.com Received: from mailout1.w1.samsung.com (HELO mailout1.w1.samsung.com) (210.118.77.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (DES-CBC3-SHA encrypted) ESMTPS; Fri, 10 Jan 2014 07:49:48 +0000 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MZ6009LMDQXJ270@mailout1.w1.samsung.com> for gcc-patches@gcc.gnu.org; Fri, 10 Jan 2014 07:49:45 +0000 (GMT) Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 50.B3.23059.816AFC25; Fri, 10 Jan 2014 07:49:44 +0000 (GMT) Received: from [106.109.128.78] by eusync1.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0MZ600MR4DQVZJ60@eusync1.samsung.com>; Fri, 10 Jan 2014 07:49:44 +0000 (GMT) Message-id: <52CFA617.6000902@partner.samsung.com> Date: Fri, 10 Jan 2014 11:49:43 +0400 From: Maxim Ostapenko User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-version: 1.0 To: Jakub Jelinek , Yury Gribov Cc: Konstantin Serebryany , GCC Patches , Viacheslav Garbuzov Subject: Re: RFC Asan instrumentation control References: <52A1D1E3.1040200@samsung.com> <52B18887.9080605@partner.samsung.com> <20131218115930.GX892@tucnak.redhat.com> <52B2DFA0.8090800@partner.samsung.com> <52B2E067.2050308@partner.samsung.com> <20131219122719.GT892@tucnak.redhat.com> <52B95DB1.3090506@partner.samsung.com> <20131227103925.GV892@tucnak.redhat.com> <52BD5F1E.8080400@samsung.com> <20131227111238.GX892@tucnak.redhat.com> <52CE599C.9080000@partner.samsung.com> In-reply-to: <52CE599C.9080000@partner.samsung.com> Content-type: multipart/mixed; boundary=------------070006050709080007050809 X-IsSubscribed: yes Hi! >>> * c-c++-common/asan/no-asan-stack.c (this triggers read overflow >>> because we haven't found a cross-platform way to grep for stack >>> redzones instrumentation) >> >> I'd prefer no test in that case, or just some semi-platform specific test >> (scan that the 0x41b58ab3 constant doesn't appear in say some late RTL dump, >> or perhaps just assembly (just scan it with lower and upper case and decimal >> too)). > > Thanks, commited in 206458 without c-c++-common/asan/no-asan-stack.c testfile. > I'll fix this test according to your recommendations a bit later. I've fixed the c-c++-common/asan/no-asan-stack.c testfile. Tested on x86_64-unknown-linux-gnu. Ok to commit? -Maxim. 2014-01-10 Max Ostapenko * c-c++-common/asan/no-asan-stack.c: New test. diff --git a/gcc/testsuite/c-c++-common/asan/no-asan-stack.c b/gcc/testsuite/c-c++-common/asan/no-asan-stack.c new file mode 100644 index 0000000..d81b834 --- /dev/null +++ b/gcc/testsuite/c-c++-common/asan/no-asan-stack.c @@ -0,0 +1,17 @@ +/* { dg-do assemble { target { x86_64-unknown-linux-gnu } } } */ +/* { dg-options "-save-temps --param asan-stack=0" } */ +#include + +volatile int one = 1; + +int +main () +{ + volatile char a1[] = {one, 2, 3, 4}; + volatile char a2[] = {1, 2*one, 3, 4}; + volatile int res = memcmp ((void *)a1,(void *)a2, 5 + one); + return 0; +} + +/* { dg-final { scan-assembler-not "0x41b58ab3|0x41B58AB3|1102416563" } } */ +/* { dg-final { cleanup-saved-temps } } */