From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3763 invoked by alias); 20 Jun 2017 12:16:22 -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 3344 invoked by uid 89); 20 Jun 2017 12:15:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.2 spammy=HContent-Transfer-Encoding:8bit X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 20 Jun 2017 12:15:39 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 141CEAAB9; Tue, 20 Jun 2017 12:15:25 +0000 (UTC) Subject: Re: [PATCH] Call BUILT_IN_ASAN_HANDLE_NO_RETURN before BUILT_IN_UNWIND_RESUME (PR sanitizer/81021). From: =?UTF-8?Q?Martin_Li=c5=a1ka?= To: gcc-patches@gcc.gnu.org Cc: Jakub Jelinek References: Message-ID: Date: Tue, 20 Jun 2017 12:16:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg01442.txt.bz2 PING^1 On 06/13/2017 10:09 AM, Martin Liška wrote: > Hi. > > For a function that does not handle an expection (and calls BUILT_IN_UNWIND_RESUME), > we need to emit call to BUILT_IN_ASAN_HANDLE_NO_RETURN. That will clean up stack > which can possibly contain poisoned shadow memory that will not be cleaned-up > in function prologue. > > Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. > > Ready to be installed? > Martin > > gcc/testsuite/ChangeLog: > > 2017-06-12 Martin Liska > > PR sanitizer/81021 > * g++.dg/asan/pr81021.C: New test. > > gcc/ChangeLog: > > 2017-06-12 Martin Liska > > PR sanitizer/81021 > * tree-eh.c (lower_resx): Call BUILT_IN_ASAN_HANDLE_NO_RETURN > before BUILT_IN_UNWIND_RESUME when ASAN is used. > --- > gcc/testsuite/g++.dg/asan/pr81021.C | 33 +++++++++++++++++++++++++++++++++ > gcc/tree-eh.c | 14 ++++++++++++++ > 2 files changed, 47 insertions(+) > create mode 100644 gcc/testsuite/g++.dg/asan/pr81021.C > >