[llvm-bugs] [Bug 49544] New: ARM BTI support - No BTI after setjmp

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Mar 11 10:33:45 PST 2021


https://bugs.llvm.org/show_bug.cgi?id=49544

            Bug ID: 49544
           Summary: ARM BTI support - No BTI after setjmp
           Product: clang
           Version: 11.0
          Hardware: Other
                OS: other
            Status: NEW
          Severity: normal
          Priority: P
         Component: C
          Assignee: unassignedclangbugs at nondot.org
          Reporter: baptiste.gourdin at trustonic.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

When enabling the -mbranch-protection={bti,standard} option in Clang, BTI/PAC
instruction are well inserted at each function entry, which works well.
However, the setjmp/longjmp API is not supported while it is in the GNU GCC
compiler (see https://gcc.gnu.org/legacy-ml/gcc-patches/2018-11/msg02472.html).
To work properly, a BTI instruction must be added after each call to setjmp
function. I have not found any reference to similar in Clang.

While this code is under fixing, is it possible to build a Clang/LLVM module to
add instruction right after these setjmp calls ?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210311/7bbd2da2/attachment.html>


More information about the llvm-bugs mailing list