-
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
rustc_codegen_ssa: don't treat inlined variables as debuginfo arguments. #68802
Merged
bors
merged 1 commit into
rust-lang:master
from
eddyb:debuginfo-there-can-only-be-one-arg
Feb 9, 2020
Merged
rustc_codegen_ssa: don't treat inlined variables as debuginfo arguments. #68802
bors
merged 1 commit into
rust-lang:master
from
eddyb:debuginfo-there-can-only-be-one-arg
Feb 9, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r? @varkor (rust_highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Feb 3, 2020
r? @nagisa cc @bjorn3 @nikomatsakis |
bjorn3
approved these changes
Feb 3, 2020
@bors r+ |
📌 Commit 80515f7 has been approved by |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Feb 7, 2020
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Feb 8, 2020
…ne-arg, r=nagisa rustc_codegen_ssa: don't treat inlined variables as debuginfo arguments. Fixes rust-lang#67586 by limiting `ArgumentVariable` special-casing to `VarDebugInfo` entries that are in `OUTERMOST_SOURCE_SCOPE`, i.e. the function's own argument scope. That excludes `VarDebugInfo` from inlined callees, which can also point to the caller's argument locals. This is a snippet from the optimized MIR (including inlining) of the testcase: ```rust fn foo(_1: usize) -> usize { debug bar => _1; // in scope 0 at ./example.rs:2:12: 2:15 let mut _0: usize; // return place in scope 0 at ./example.rs:2:27: 2:32 scope 1 { debug x => _1; // in scope 1 at /rustc/9ed29b6ff6aa2e048b09c27af8f62ee3040bdb37/src/libcore/convert/mod.rs:106:26: 106:27 } ``` `scope 1` is from inlining the `identity` call, and `debug x => _1;` comes from the body of `core::convert::identity`, so they are now ignored for the purposes of determining the `ArgumentVariable` debuginfo associated to `_1`.
bors
added a commit
that referenced
this pull request
Feb 8, 2020
…agisa rustc_codegen_ssa: don't treat inlined variables as debuginfo arguments. Fixes #67586 by limiting `ArgumentVariable` special-casing to `VarDebugInfo` entries that are in `OUTERMOST_SOURCE_SCOPE`, i.e. the function's own argument scope. That excludes `VarDebugInfo` from inlined callees, which can also point to the caller's argument locals. This is a snippet from the optimized MIR (including inlining) of the testcase: ```rust fn foo(_1: usize) -> usize { debug bar => _1; // in scope 0 at ./example.rs:2:12: 2:15 let mut _0: usize; // return place in scope 0 at ./example.rs:2:27: 2:32 scope 1 { debug x => _1; // in scope 1 at /rustc/9ed29b6ff6aa2e048b09c27af8f62ee3040bdb37/src/libcore/convert/mod.rs:106:26: 106:27 } ``` `scope 1` is from inlining the `identity` call, and `debug x => _1;` comes from the body of `core::convert::identity`, so they are now ignored for the purposes of determining the `ArgumentVariable` debuginfo associated to `_1`.
💔 Test failed - checks-azure |
bors
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Feb 8, 2020
@bors retry
|
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Feb 8, 2020
bors
added a commit
that referenced
this pull request
Feb 8, 2020
…agisa rustc_codegen_ssa: don't treat inlined variables as debuginfo arguments. Fixes #67586 by limiting `ArgumentVariable` special-casing to `VarDebugInfo` entries that are in `OUTERMOST_SOURCE_SCOPE`, i.e. the function's own argument scope. That excludes `VarDebugInfo` from inlined callees, which can also point to the caller's argument locals. This is a snippet from the optimized MIR (including inlining) of the testcase: ```rust fn foo(_1: usize) -> usize { debug bar => _1; // in scope 0 at ./example.rs:2:12: 2:15 let mut _0: usize; // return place in scope 0 at ./example.rs:2:27: 2:32 scope 1 { debug x => _1; // in scope 1 at /rustc/9ed29b6ff6aa2e048b09c27af8f62ee3040bdb37/src/libcore/convert/mod.rs:106:26: 106:27 } ``` `scope 1` is from inlining the `identity` call, and `debug x => _1;` comes from the body of `core::convert::identity`, so they are now ignored for the purposes of determining the `ArgumentVariable` debuginfo associated to `_1`.
☀️ Test successful - checks-azure |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
merged-by-bors
This PR was explicitly merged by bors.
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #67586 by limiting
ArgumentVariable
special-casing toVarDebugInfo
entries that are inOUTERMOST_SOURCE_SCOPE
, i.e. the function's own argument scope.That excludes
VarDebugInfo
from inlined callees, which can also point to the caller's argument locals.This is a snippet from the optimized MIR (including inlining) of the testcase:
scope 1
is from inlining theidentity
call, anddebug x => _1;
comes from the body ofcore::convert::identity
, so they are now ignored for the purposes of determining theArgumentVariable
debuginfo associated to_1
.