From patchwork Tue Dec 13 12:14:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 87866 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp2168044qgi; Tue, 13 Dec 2016 04:14:25 -0800 (PST) X-Received: by 10.84.211.7 with SMTP id b7mr48521609pli.83.1481631265247; Tue, 13 Dec 2016 04:14:25 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id 123si47725687pgh.10.2016.12.13.04.14.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Dec 2016 04:14:25 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-444288-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-444288-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-444288-patch=linaro.org@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=NYkVO2eZXar/Y2tWD 1z2PNgXJcOx2zBUlHl0YlKRFf3Cefcy3qY1vQU0iP2JKn31+6aV4cbRhKz319R2Q yrDpZgsSZX/u1PPmM5t2mk0qdRQWxpXYtsylfl0f2d9Dttw/4NSS8H8Mpd8IxWiZ l9ueFUqSU+UFo8V76WvkyQCU/A= 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 :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=uytd/BT8rADXym6FR6/Lci9 1Npo=; b=EUhSvJ/7wzgqPs58kgnxUsZdMWKmmdS9RoDvB3dPMA0JSxKTmPF5XJh myJx8UcIrs7HNjpUF+4GCtYEXjOTcjJyB8LlNrWOKLYFMjIRBlzufTxYQkrjPIB9 Nfxy5FA0dSPYoQi/opQVpr8P34py0Gzvhk7Fllm7Xrn2SA4p59FY= Received: (qmail 126276 invoked by alias); 13 Dec 2016 12:14:13 -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 126262 invoked by uid 89); 13 Dec 2016 12:14:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, SPF_PASS autolearn=ham version=3.3.2 spammy=H*M:8936 X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 13 Dec 2016 12:14:02 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 70ABEADD8; Tue, 13 Dec 2016 12:14:00 +0000 (UTC) Subject: Re: [PATCH] Add pretty printer for ASAN_MARK and add a helper fn To: Jakub Jelinek References: <886f68be-375d-1585-73be-604410ee7fbc@suse.cz> <20161213090525.GI3541@tucnak.redhat.com> Cc: GCC Patches From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Message-ID: <57f73f35-0e77-de7f-8936-88429f72a7b2@suse.cz> Date: Tue, 13 Dec 2016 13:14:00 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20161213090525.GI3541@tucnak.redhat.com> X-IsSubscribed: yes On 12/13/2016 10:05 AM, Jakub Jelinek wrote: > Ok. But the builtins should be renamed too (incrementally), > BUILT_IN_ASAN_CLOBBER_N, "__asan_poison_stack_memory", > should really be BUILT_IN_ASAN_POISON_STACK_MEMORY etc. > > Jakub This is follow-up that I've just tested and reg-bootstrapped. Ready for trunk? Thanks, Martin >From 8fd18d8fde8f2e3a10812698c37d601c2a52aee7 Mon Sep 17 00:00:00 2001 From: marxin Date: Tue, 13 Dec 2016 10:19:48 +0100 Subject: [PATCH 1/2] Rename BUILT_IN_ASAN_CLOBBER_N to BUILT_IN_ASAN_POISON_STACK_MEMORY. gcc/ChangeLog: 2016-12-13 Martin Liska * asan.c (asan_expand_mark_ifn): Use renamed BUILT_IN_ASAN_{UN}CLOBBER_N to BUILT_IN_ASAN_{UN}POISON_STACK_MEMORY. * sanitizer.def: Likewise. --- gcc/asan.c | 5 +++-- gcc/sanitizer.def | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/gcc/asan.c b/gcc/asan.c index e297784270d..53acff0a2fb 100644 --- a/gcc/asan.c +++ b/gcc/asan.c @@ -2838,8 +2838,9 @@ asan_expand_mark_ifn (gimple_stmt_iterator *iter) gsi_insert_before (iter, g, GSI_SAME_STMT); tree sz_arg = gimple_assign_lhs (g); - tree fun = builtin_decl_implicit (is_poison ? BUILT_IN_ASAN_CLOBBER_N - : BUILT_IN_ASAN_UNCLOBBER_N); + tree fun + = builtin_decl_implicit (is_poison ? BUILT_IN_ASAN_POISON_STACK_MEMORY + : BUILT_IN_ASAN_UNPOISON_STACK_MEMORY); g = gimple_build_call (fun, 2, base_addr, sz_arg); gimple_set_location (g, loc); gsi_insert_after (iter, g, GSI_NEW_STMT); diff --git a/gcc/sanitizer.def b/gcc/sanitizer.def index 3db08a7b702..43e46f90e9c 100644 --- a/gcc/sanitizer.def +++ b/gcc/sanitizer.def @@ -165,9 +165,11 @@ DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_BEFORE_DYNAMIC_INIT, DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_AFTER_DYNAMIC_INIT, "__asan_after_dynamic_init", BT_FN_VOID, ATTR_NOTHROW_LEAF_LIST) -DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_CLOBBER_N, "__asan_poison_stack_memory", +DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_POISON_STACK_MEMORY, + "__asan_poison_stack_memory", BT_FN_VOID_PTR_PTRMODE, ATTR_NOTHROW_LEAF_LIST) -DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_UNCLOBBER_N, "__asan_unpoison_stack_memory", +DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_UNPOISON_STACK_MEMORY, + "__asan_unpoison_stack_memory", BT_FN_VOID_PTR_PTRMODE, ATTR_NOTHROW_LEAF_LIST) /* Thread Sanitizer */ -- 2.11.0