-
Notifications
You must be signed in to change notification settings - Fork 13k
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
custom derive causing ICE on beta and nightly #48739
Comments
I'm pushing to the branch linked above as I attempt to isolate the bug. Removing all instances of |
Specifically this line (or any usage of |
cc @rust-lang/release -- it would be awesome to bisect this and try to find where the problem was introduced. @sgrif the only working end point we have is that it works on current stable, right? |
triage: P-high |
Running a bisect. |
@nikomatsakis the bisect run points at #47181 as the cause of the regression (merge commit ca09293). |
cc @michaelwoerister -- this seems to be due to "Use DefIndex encoding that works better with on-disk variable length integer representations." (#47181) |
reassigning to @michaelwoerister under assumption that he is best person to investigate how #47181 caused this ICE |
Think you'd be able to take a look? |
OK, will take a look. |
I think I know what's going on here: Proc-macros are handled weirdly in the Here is a stacktrace with line numbers (valid for rustc e65547d)
I'm not sure how to solve this best. Probably by cleaning up proc-macro handling. @rust-lang/compiler, @alexcrichton, do any of you know why we don't use regular |
Suspiciously similar to #48941 |
@michaelwoerister I think long ago it was done as a way of easily assigning the registrar to have a known symbol (so it can be dlopen'd and dlsym'd by rustc itself), but nowadays I think there's much better mechanics for doing that. My guess is that we should probably rip out everything related to registrar symbol names and just slap a |
(I could also be totaly wrong, I barely remember what these are doing at this point) |
@estebank while both are ICEs that occur around custom macros, #48941 is due to a very localized mistake (calling If anything, I think it is just an indication that proc macros and especially plugins are undertested. (so refactorings are more likely to break them) |
@alexcrichton I think symbol names of registrar functions don't depend on rust/src/librustc/session/mod.rs Lines 685 to 697 in 8c4ff22
I'll look into cleaning this up. I want to get acquainted with the crate store code anyway because I suspect that it will need refactoring for further querification/parallelization. |
If anything, I think it is just an indication that plugins and proc macros are undertested. (so refactorings are more likely to break them)
+100
|
…cro-defkey, r=eddyb Fix DefKey lookup for proc-macro crates. Add a special case for proc-macro crates for `def_key()` in the metadata decoder (like we already have for many other methods in there). In the long run, it would be preferable to get rid of the need for special casing proc-macro crates (see rust-lang#49271). Fixes rust-lang#48739 (though I wasn't able to come up with a regression test, unfortunately) r? @eddyb
…cro-defkey, r=eddyb Fix DefKey lookup for proc-macro crates. Add a special case for proc-macro crates for `def_key()` in the metadata decoder (like we already have for many other methods in there). In the long run, it would be preferable to get rid of the need for special casing proc-macro crates (see rust-lang#49271). Fixes rust-lang#48739 (though I wasn't able to come up with a regression test, unfortunately) r? @eddyb
…cro-defkey, r=eddyb Fix DefKey lookup for proc-macro crates. Add a special case for proc-macro crates for `def_key()` in the metadata decoder (like we already have for many other methods in there). In the long run, it would be preferable to get rid of the need for special casing proc-macro crates (see rust-lang#49271). Fixes rust-lang#48739 (though I wasn't able to come up with a regression test, unfortunately) r? @eddyb
While working on a new feature for Diesel, one of the changes caused the compiler to start ICEing on beta and nightly. The code works fine on stable. The branch is https://github.com/diesel-rs/diesel/compare/sg-rust-bug
I'm still trying to pin down what specifically caused the ICE. The crash happens before it actually gets to the custom derive at all, so it seems that just adding
#[derive(ValidGrouping)]
to one of those types caused it. Here's the backtrace:The text was updated successfully, but these errors were encountered: