-
Notifications
You must be signed in to change notification settings - Fork 12.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
Codegen issue with lto and panic=abort #39455
Comments
It looks like it's the interaction between LLVMRustMarkAllFunctionsNounwind and createCFGSimplificationPass() https://github.com/rust-lang/llvm/blob/ceb177eeefa7d67ca29230d2e7e8584f97d4fdad/lib/Transforms/IPO/PassManagerBuilder.cpp#L761 |
Now that I can produce that is largely the same except for LLVMRustMarkAllFunctionsNounwind and CFGSimplification I'm going to try reproducing the problem in rr again and see if I can figure out where the control flow diverges. Hopefully that will give a better picture of what's going wrong. |
So I ran the two replays side by side. I noticed a divergence where the broken one was writing to stack location that looks to be used a type tag (the bad value causes the crash) and the working one is not writing to that same location. The writing happens around rust/src/libstd/sync/mpsc/shared.rs:251 which feels a bit weird. Given the manifestation of the bug it feels like the problem could be happening during actual backend code-gen and not during ir optimization. |
Further investigation and a good guess revealed that is triggered during stack coloring. i.e. setting -no-stack-coloring makes the problem go away. My guess is that there's something going wrong with the lifetime annotations. Either wrong from the beginning or going wrong during CGFSimplication. |
It looks like MachineFrameInfo::print will be valuable in getting information on what's going on here. I'll try to get that today. |
This was fixed by #38669 |
I'm seeing what looks like a codegen/llvm issue in webrender/gecko.
It seems like we're dropping ApiMsg::AddRawFont after running the Err() case here:
https://github.com/servo/webrender/blob/456f87056e62f437f543f45cc4fbd713c26660e7/webrender/src/render_backend.rs#L346
Removing the LLVMRustMarkAllFunctionsNounwind pass from lto.rs avoids the problem.
I'm going to try to narrow it down more tomorrow. It'd be nice to do this with llvm's bugpoint tool but I'm not sure of how to use it to replicate this issue.
The text was updated successfully, but these errors were encountered: