[llvm-bugs] [Bug 46258] New: [AArch64] Some functions compiled without BTI with -fsanitize=cfi
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jun 9 13:05:34 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=46258
Bug ID: 46258
Summary: [AArch64] Some functions compiled without BTI with
-fsanitize=cfi
Product: new-bugs
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: peter at pcc.me.uk
Reporter: samitolvanen at google.com
CC: htmldeveloper at gmail.com, keescook at chromium.org,
llvm-bugs at lists.llvm.org
When compiling a binary with both -mbranch-protection=bti and -fsanitize=cfi,
LLVM warns about functions being compiled without BTI:
$ echo "void a() {}" > test.c
$ clang -target aarch64-linux-gnu- -mbranch-protection=bti \
-flto=thin -fvisibility=default -fsanitize=cfi -fsanitize-cfi-cross-dso \
-c test.c
$ ld.lld -r -o test.lto.o test.o
warning: some functions compiled with BTI and some compiled without BTI
warning: not setting BTI in feature flags
Looking at the disassembly of test.o, it looks like the compiler generated
__cfi_check and __cfi_check_fail functions don't have the
"branch-target-enforcement" attribute.
--
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/20200609/119e1838/attachment.html>
More information about the llvm-bugs
mailing list