[llvm] ThinLTOBitcodeWriter: Emit __cfi_check to full LTO part of bitcode file. (PR #154833)

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 28 15:00:20 PDT 2025


pcc wrote:

> My initial testing showed this was working... but further testing shows it's not completely reliable. Example:
> 
> ```
> $ cat a.c
> int a = 3;
> $ cat b.c
> void g(){}
> $ clang a.c b.c -flto=thin -fsanitize=cfi -fsanitize-cfi-cross-dso -O2 -c -fvisibility=default
> $ clang a.o b.o -flto=thin -fsanitize=cfi -fsanitize-cfi-cross-dso -O2 -fuse-ld=lld -shared -Wl,-save-temps -fvisibility=default
> $ opt -S a.out.0.0.preopt.bc
> ```

Thanks for the test case, #155930 should fix.

https://github.com/llvm/llvm-project/pull/154833


More information about the llvm-commits mailing list