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: Martin Liška <mliska at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Jakub Jelinek <jakub at redhat dot com>
- Date: Tue, 20 Jun 2017 14:15:24 +0200
- Subject: Re: [PATCH] Call BUILT_IN_ASAN_HANDLE_NO_RETURN before BUILT_IN_UNWIND_RESUME (PR sanitizer/81021).
- Authentication-results: sourceware.org; auth=none
- References: <c9ab0efb-d401-c42c-4bd2-e848ebef0c87@suse.cz>
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 <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.
> ---
> 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
>
>