https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104449

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jakub Jelinek
<ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:8a97d7bdb38285a7954f67172013098b61548870

commit r11-9604-g8a97d7bdb38285a7954f67172013098b61548870
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Sat Feb 12 19:17:44 2022 +0100

    asan: Fix up address sanitizer instrumentation of __builtin_alloca* if it
can throw [PR104449]

    With -fstack-check* __builtin_alloca* can throw and the asan
    instrumentation of this builtin wasn't prepared for that case.
    The following patch fixes that by replacing the builtin with the
    replacement builtin and emitting any further insns on the fallthru
    edge.

    I haven't touched the hwasan code which most likely suffers from the
    same problem.

    2022-02-12  Jakub Jelinek  <ja...@redhat.com>

            PR sanitizer/104449
            * asan.c: Include tree-eh.h.
            (handle_builtin_alloca): Handle the case when __builtin_alloca or
            __builtin_alloca_with_align can throw.

            * gcc.dg/asan/pr104449.c: New test.
            * g++.dg/asan/pr104449.C: New test.

    (cherry picked from commit f0c7367b8802c47efaad87b1f2126fe6350d8b47)

Reply via email to