Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib: libutils: Use ret for longjmp with Clang and BTI
longjmp uses br instead of ret to jump to the target. Thus the target location should have the right BTI launchpad to handle this. clang has a bug [1] and doesn't add the BTI after setjmp causing exception when BTI is enabled. This works well with gcc [2] and can be tested when compiling xtests with WITH_CXX_TESTS=n. To avoid the exception, use ret instead of br with clang and BTI. [1] - https://bugs.llvm.org/show_bug.cgi?id=49544 [2] - https://gcc.gnu.org/legacy-ml/gcc-patches/2018-11/msg02472.html Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org>
- Loading branch information