Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sanitizer=cfi does not work with Clto=thin ? #111183

Open
matthiaskrgr opened this issue May 4, 2023 · 3 comments
Open

sanitizer=cfi does not work with Clto=thin ? #111183

matthiaskrgr opened this issue May 4, 2023 · 3 comments
Assignees
Labels
A-sanitizers Area: Sanitizers for correctness and code quality C-bug Category: This is a bug. PG-exploit-mitigations Project group: Exploit mitigations

Comments

@matthiaskrgr
Copy link
Member

matthiaskrgr commented May 4, 2023

rustc src/main.rs -Zsanitizer=cfi -Zsanitizer-cfi-normalize-integers

error: `-Zsanitizer=cfi` requires `-Clto`, `-Clto=thin`, or `-Clinker-plugin-lto`

so I tried thin:
rustc src/main.rs -Zsanitizer=cfi -Zsanitizer-cfi-normalize-integers -Clto=thin
but this does not work?

error: failed to prepare thin LTO context: Expected a single module

@matthiaskrgr matthiaskrgr added the C-bug Category: This is a bug. label May 4, 2023
@matthiaskrgr matthiaskrgr added the PG-exploit-mitigations Project group: Exploit mitigations label May 13, 2023
@rcvalle
Copy link
Member

rcvalle commented Aug 9, 2023

@rustbot claim

@rcvalle
Copy link
Member

rcvalle commented Aug 9, 2023

Unfortunately CFI currently doesn't work with rustc thin and local thin LTO, so I've disabled it for now in #113593, and intent to look at it--I just need more time.

@Jules-Bertholet
Copy link
Contributor

@rustbot label A-sanitizers

@rustbot rustbot added the A-sanitizers Area: Sanitizers for correctness and code quality label Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sanitizers Area: Sanitizers for correctness and code quality C-bug Category: This is a bug. PG-exploit-mitigations Project group: Exploit mitigations
Projects
None yet
Development

No branches or pull requests

4 participants