Skip to content

AArch64 BTI support - No BTI after setjmp #48888

Closed
@llvmbot

Description

@llvmbot
Bugzilla Link 49544
Version 11.0
OS other
Reporter LLVM Bugzilla Contributor
CC @DougGregor,@zygoloid,@smithp35

Extended Description

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 ?

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions