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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Szabolcs Nagy <n...@gcc.gnu.org>:

https://gcc.gnu.org/g:d523cd5109bc5ab42edf85385f6a1085e0d6028c

commit r8-10252-gd523cd5109bc5ab42edf85385f6a1085e0d6028c
Author: Szabolcs Nagy <szabolcs.n...@arm.com>
Date:   Fri Apr 3 09:35:41 2020 +0000

    aarch64, libgcc: Fix unwinding from pac-ret to normal frames [PR94514]

    With -mbranch-protection=pac-ret the debug info toggles the
    signedness state of the return address so the unwinder knows when
    the return address needs pointer authentication.

    The unwind context flags were not updated according to the dwarf
    frame info.

    This causes unwinding across frames that were built without pac-ret
    to incorrectly authenticate the return address wich corrupts the
    return address on a system where PAuth is enabled.

    Note: This even affects systems where all code use pac-ret because
    unwinding across a signal frame the return address is not signed.

    Changed branch-protection=pac-ret to sign-return-address=all etc
    in the tests for the backport.

    gcc/testsuite/ChangeLog:

            Backport from mainline.
            2020-04-23  Szabolcs Nagy  <szabolcs.n...@arm.com>

            PR target/94514
            * g++.target/aarch64/pr94514.C: Require lp64.
            * gcc.target/aarch64/pr94514.c: Likewise.

            Backport from mainline.
            2020-04-21  Szabolcs Nagy  <szabolcs.n...@arm.com>

            PR target/94514
            * g++.target/aarch64/pr94514.C: New test.
            * gcc.target/aarch64/pr94514.c: New test.

    libgcc/ChangeLog:

            Backport from mainline.
            2020-04-21  Szabolcs Nagy  <szabolcs.n...@arm.com>

            PR target/94514
            * config/aarch64/aarch64-unwind.h (aarch64_frob_update_context):
            Update context->flags accroding to the frame state.

Reply via email to