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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Uros Bizjak <[email protected]>:

https://gcc.gnu.org/g:79b81766b10cbe337151a687b30003861565357d

commit r14-13006-g79b81766b10cbe337151a687b30003861565357d
Author: Uros Bizjak <[email protected]>
Date:   Tue Nov 3 18:08:16 2026 +0100

    i386: Check CF_RETURN bit in ix86_expand_epilogue [PR128409]

    flag_cf_protection is a bitmask, so a nonzero value does not imply
    that shadow stack is enabled: it may hold only CF_BRANCH, or the
    CF_SET and CF_CHECK bookkeeping bits.  Test the CF_RETURN bit when
    deciding to use an indirect jump for EH return, and when passing
    set_cfa to pro_epilogue_adjust_stack.

    Assisted-by: Claude Sonnet 5.5

            PR target/128409

    gcc/ChangeLog:

            * config/i386/i386.cc (ix86_expand_epilogue): Check
            flag_cf_protection & CF_RETURN instead of flag_cf_protection.

    gcc/testsuite/ChangeLog:

            * gcc.target/i386/pr128409-1.c: New test.
            * gcc.target/i386/pr128409-2.c: Ditto.

    (cherry picked from commit ea93a47f579607698186dbced583ad1729f4ccb8)

Reply via email to