-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Compiler segfaults when casting 0 as fat pointer #30577
Comments
We’re hitting an assertion in LLVM:
BT:
|
Maybe this is a separate bug?:
|
Its the same thing. LLVM will report the same error in different ways depending on optimisation and debug settings it was built with – and also for different IRs that essentially have the same issue. |
This is the coercion code being silly.
cc @eddyb |
@arielb1 It's a valid coercion, and the reason smart pointers have DST support. |
So its the coercion trans code rather than the coercion typeck code being silly. |
I think a cast gets skipped or something. |
The problem is that translating |
I'm not sure if this is the same bug or not, but steveklabnik@b5b2602#diff-da456bd3af6d94a9693e625ff7303113R787 SEEMED to be causing a segfault as well, without the extra casts. I'm trying to investigate a bit more now. |
This was fixed by #32430. |
This is really nasty code, but simias on IRC was trying to get a null fat-pointer constant and this was one idea I tried.
This causes a segfault in rustc during compilation. The "unused variable" warning displays. I don't have a rustc with debug symbols, so not attaching backtrace, sorry.
Possibly related to #13520
The text was updated successfully, but these errors were encountered: