-
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
MIR inlining does not handle SourceScopeLocalData
#66137
Comments
SourceScopeLocalData
SourceScopeLocalData
Sounds like a simple enough omission, but I'm surprised this doesn't break any of our |
I don't think this is |
@rustbot assign @Aaron1011 |
During MIR optimization, we may inline function calls acrross crates. While we can inline the corresponding scopes into `Body.source_scopes`, we cannot inline the corresponding data from `source_scope_local_data`, since it references crate-local data. This commit makes us fall back to the root lint level when generating a CTFE backtrace, if it was not possible to find crate-local data for a scope in `source_scope_local_data`. Fixes rust-lang#66137
@Aaron1011 Oh, I thought the concern was entirely about same-crate, sorry! I think the fix in that case is to move the |
@eddyb: |
Oops, I misread your proposal - you were talking about changing |
This was fixed in #66789 as far as I can tell |
During the MIR inlining pass, we add scopes from the callee to
Body.source_scopes
in the caller. However, we do not updatesource_scope_local_data
, which causes any inlined scopes to have no entry in the callersource_scope_local_data
. This causes an ICE in Miri when we try to generate a stacktrace - however, the ICE occurs in rustc code, so it's possible that we might run across this without Miri.The text was updated successfully, but these errors were encountered: