OSX CFI produces relocation issues #122848
Labels
A-sanitizers
Area: Sanitizers for correctness and code quality
C-bug
Category: This is a bug.
O-macos
Operating system: macOS
PG-exploit-mitigations
Project group: Exploit mitigations
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
As seen when testing #122456
I tried this code:
compiled with
rustc --crate-type=bin -C prefer-dynamic=off -Clto -Zsanitizer=cfi -C target-feature=-crt-static -C codegen-units=1 -C opt-level=0
on OSXI expected to see this happen: Builds successfully
Instead, this happened: Relocation issues:
The patch being tested only adjusts labels, so this bug is about fixing actually producing CFI executables on OSX - all the previously existing tests were codegen only.
It is likely that a much smaller program (possibly anything with an indirect call? any function?) will trigger this issue without needing the
FnPtrShim
, but I don't personally have a mac to test with.The text was updated successfully, but these errors were encountered: