-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Stabilise c_unwind
#116088
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
Stabilise c_unwind
#116088
Conversation
This comment has been minimized.
This comment has been minimized.
|
I've updated the |
|
I think #113923 should resolve this, but I'm not 100% sure. Alternatively we should ensure that |
From the error log, yes. |
|
Panic strategy and overflow checks are currently defined on Session, and if we want to force them for compiler builtins then we'll need to make them queries. Maybe instead of ad-hoc special cases we should just wait for #113923 to land first. |
|
☔ The latest upstream changes (presumably #116260) made this pull request unmergeable. Please resolve the merge conflicts. |
We also need to force an unlimited amount of codegen units for compiler-builtins to be compiled correctly. |
This comment has been minimized.
This comment has been minimized.
|
@nbdd0121 any updates on this? |
|
☔ The latest upstream changes (presumably #117472) made this pull request unmergeable. Please resolve the merge conflicts. |
This comment has been minimized.
This comment has been minimized.
|
I spent way too much time debugging the error today... I couldn't reproduce the issue when compiling directly (with downloaded LLVM), but the issue is reproducible with both x86_64-gnu-llvm-16 and x86_64-gnu-llvm-17 containers. This error looks identical to #116976 (llvm/llvm-project#70578), and fix of which is to upgrade LLVM to 17.0.4. But the CI is using LLVM versions without the fix (I checked that the CI containers uses Ubuntu shipped LLVM 16.0.0 and 17.0.2, both of which I believe does not have the fix). What should be done to get the CI to work? Perhaps we should disable noalias when LLVM version < 17.0.4? cc @dianqk |
Could you try to revert this commit locally to verify that it is indeed the same issue? We may need to build stage 2. |
|
Cc @nikic |
|
Hm, this is a tricky case. Disabling noalias on older versions is a possibility, but it comes with it's own risks -- it's a big change in optimization behavior, which may surface other latent issues. We've seen this e.g. with the attempt to drop inbounds on getelementptr. I'd rather not rock the boat if we can avoid it, especially for old versions that receive little testing. Something we should consider, especially to account for future cases where there might not be any workaround like "disable noalias", is to explicitly document additional patches that Rust requires if a certain system LLVM version is used. In that case we should change our llvm-N CI to build LLVM with the necessary patches ourselves. At least for Fedora's use case (cc @cuviper) I think we wouldn't mind if additional patches are required, as long as they're clearly documented. |
Yes, I can confirm that reverting
I think noalias probably is one of the safer attribute to disable, consider that we already disable it for
This would be great, would it then require cooperation from distributions to ensure miscompilation bugs that affect us are backported to LLVM releases that they support? I found a workaround which is to change |
|
The Miri subtree was changed cc @rust-lang/miri |
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (1aaab8b): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary -4.8%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (primary 2.1%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeResults (primary -0.2%, secondary -1.0%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Bootstrap: 691.418s -> 690.905s (-0.07%) |
|
About time :) thanks for all the work on this @nbdd0121!! |
Fix #74990
Fix #115285 (that's also where FCP is happening)
Marking as draft PR for now due to
compiler_builtinsissuesr? @Amanieu