-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
CFI and FullLTO crashes in DAG Instruction Selection with Assertion in `isa<To>(Val) && "cast<Ty>() argument of incompatible type!"' failed. #112053
Labels
compiler-rt:cfi
Control Flow Integrity
ipo
Interprocedural optimizations
llvm:codegen
LTO
Link time optimization (regular/full LTO or ThinLTO)
Comments
EugeneZelenko
added
compiler-rt:cfi
Control Flow Integrity
LTO
Link time optimization (regular/full LTO or ThinLTO)
and removed
new issue
labels
Oct 11, 2024
I'm attaching the crash reproducer. |
gulfemsavrun
changed the title
CFI and FullLTO results in Assertion `isa<To>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
CFI and FullLTO crashes in DAG Instruction Selection with Assertion in `isa<To>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
Oct 11, 2024
I'll look into this next week. I believe this is related to CFI's interaction with FatLTO. |
I was able to get some reduced IR.
|
That's from a much larger function though.
|
This was referenced Oct 17, 2024
ilovepi
added a commit
that referenced
this issue
Oct 30, 2024
Currently, the `DropTypeTests` parameter only fully works with phi nodes and llvm.assume instructions. However, we'd like CFI to work in conjunction with FatLTO, in so far as the bitcode section should be able to contain the CFI instrumentation, while any incompatible bits are dropped when compiling the object code. To do that, we need to drop the llvm.type.test instructions everywhere, and not just their uses in phi nodes. This patch updates the LowerTypeTest pass so that uses are removed, and replaced with `true` in all cases, and not just in phi nodes. Addressing this will allow us to fix #112053 by modifying the FatLTO pipeline. Reviewers: pcc, nikic Reviewed By: pcc Pull Request: #112787
EugeneZelenko
added
llvm:codegen
ipo
Interprocedural optimizations
and removed
llvm:SelectionDAG
SelectionDAGISel as well
labels
Oct 31, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
compiler-rt:cfi
Control Flow Integrity
ipo
Interprocedural optimizations
llvm:codegen
LTO
Link time optimization (regular/full LTO or ThinLTO)
When we combine Full LTO (aka traditional LTO) with CFI, we run into the following assertion failure:
The text was updated successfully, but these errors were encountered: