-
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
translating statics/consts segfaults LLVM if order is wrong #29884
Comments
I believe the cause of this is #26630. |
cc @eefriedman -- this is triggered by recursive statics (see also some notes on #29719, if you haven't already) |
duplicate of #28324 (or pseudo-duplicate - the issue was intended to capture the "actually linkable" case too). |
@arielb1 ah, yes, I remember this issue. And there is a legit question also of whether we should support the kind of derefs etc that are evident here vs having people create intermediate statics. I personally am not terribly fond of that, since the value of a static is not necessarily fixed over the course of an execution. |
Reminder, that LLVM asserts turn into undefined behaviour (I believe?) when built in release mode. Probably would be good to compile a debug LLVM to see what’s the assert? |
The issue is known - we are attempting to dereference a static that is not defined. |
This is fixed. |
The original test case, indeed, does not seem to compile. |
Shouldn’t we add a regression test or something? |
Ah hmm. Okay nevermind then. |
This test case (a permutation of
const-autoderef.rs
) causes rustc to segfault (somewhere in LLVM):Uncovered while working on separating items from HIR, since the new visitors can sometimes visit items in different orders (unless you force them to do otherwise).
The text was updated successfully, but these errors were encountered: