-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Use DefId
instead of Span
in BrAnon
to avoid stable hashing collisions
#104274
Use DefId
instead of Span
in BrAnon
to avoid stable hashing collisions
#104274
Conversation
r? @fee1-dead (rustbot has picked a reviewer for you, use r? to override) |
Hm, actually, that diagnostic does kinda suck now for the However, I'm inclined to land this as-is given the ICEs (and to avoid having to revert the original PR altogther), but I'd like @jackh726's opinion on it. |
Yeah, I had tried this first before I realized that the diagnostics were pointing to the wrong place. I guess we can land this. I suppose the error is still better than what it was before. Ugh. @bors r+ |
And let's try to get an MCVE in at some point. |
Superseded, not needed anymore! |
Recent reports of ICEs due to the fact that
BrAnon
regions now capture spans, which apparently sometimes canStableHash
into identical values butHash
into different values, causing collisions in dep nodes that are not covered by identical cache entries.We can avoid this by just using a
DefId
insteadwhich doesn't affect diagnosticsedit: this is not true.I have no idea how to turn #104271, #104255, or #104238 into a MCVE, though, but local testing shows that the projects build without ICE after this change.
This brings up a bigger question about whether we should be rejecting
Span
s from query keys (or at least being much more careful about them)...Fixes #104271
Fixes #104255
Fixes #104238
cc #103171 @cjgillot @jackh726