This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Call BUILT_IN_ASAN_HANDLE_NO_RETURN before BUILT_IN_UNWIND_RESUME (PR sanitizer/81021).
- From: Jeff Law <law at redhat dot com>
- To: Martin Liška <mliska at suse dot cz>, gcc-patches at gcc dot gnu dot org
- Cc: Jakub Jelinek <jakub at redhat dot com>
- Date: Thu, 29 Jun 2017 11:16:57 -0600
- Subject: Re: [PATCH] Call BUILT_IN_ASAN_HANDLE_NO_RETURN before BUILT_IN_UNWIND_RESUME (PR sanitizer/81021).
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=law at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A9F76A49FC
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A9F76A49FC
- References: <c9ab0efb-d401-c42c-4bd2-e848ebef0c87@suse.cz>
On 06/13/2017 02: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 <mliska@suse.cz>
>
> PR sanitizer/81021
> * g++.dg/asan/pr81021.C: New test.
>
> gcc/ChangeLog:
>
> 2017-06-12 Martin Liska <mliska@suse.cz>
>
> PR sanitizer/81021
> * tree-eh.c (lower_resx): Call BUILT_IN_ASAN_HANDLE_NO_RETURN
> before BUILT_IN_UNWIND_RESUME when ASAN is used.
OK.
Jeff