Skip to content
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

debuginfo: Fix debuginfo for Box<T> where T is unsized. #95270

Merged
merged 1 commit into from
Mar 25, 2022

Conversation

michaelwoerister
Copy link
Member

Before this fix, the debuginfo for the fields was generated from the struct defintion of Box, but (at least at the moment) the compiler pretends that Box is just a (fat) pointer, so the fields need to be pointer and vtable instead of __0: Unique<T> and __1: Allocator.

This is meant as a temporary mitigation until we can make sure that simply treating Box as a regular struct in debuginfo does not cause too much breakage in the ecosystem.

r? @wesleywiser

Before this fix, the debuginfo for the fields was generated from the
struct defintion of Box<T>, but (at least at the moment) the compiler
pretends that Box<T> is just a (fat) pointer, so the fields need to be
`pointer` and `vtable` instead of `__0: Unique<T>` and `__1: Allocator`.

This is meant as a temporary mitigation until we can make sure that
simply treating Box as a regular struct in debuginfo does not cause too
much breakage in the ecosystem.
@michaelwoerister michaelwoerister added A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Mar 24, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 24, 2022
@wesleywiser
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Mar 24, 2022

📌 Commit e169261 has been approved by wesleywiser

@bors 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 Mar 24, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Mar 24, 2022
…buginfo, r=wesleywiser

debuginfo: Fix debuginfo for Box<T> where T is unsized.

Before this fix, the debuginfo for the fields was generated from the struct defintion of Box<T>, but (at least at the moment) the compiler pretends that Box<T> is just a (fat) pointer, so the fields need to be `pointer` and `vtable` instead of `__0: Unique<T>` and `__1: Allocator`.

This is meant as a temporary mitigation until we can make sure that simply treating Box as a regular struct in debuginfo does not cause too much breakage in the ecosystem.

r? `@wesleywiser`
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Mar 24, 2022
…buginfo, r=wesleywiser

debuginfo: Fix debuginfo for Box<T> where T is unsized.

Before this fix, the debuginfo for the fields was generated from the struct defintion of Box<T>, but (at least at the moment) the compiler pretends that Box<T> is just a (fat) pointer, so the fields need to be `pointer` and `vtable` instead of `__0: Unique<T>` and `__1: Allocator`.

This is meant as a temporary mitigation until we can make sure that simply treating Box as a regular struct in debuginfo does not cause too much breakage in the ecosystem.

r? ``@wesleywiser``
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Mar 24, 2022
…buginfo, r=wesleywiser

debuginfo: Fix debuginfo for Box<T> where T is unsized.

Before this fix, the debuginfo for the fields was generated from the struct defintion of Box<T>, but (at least at the moment) the compiler pretends that Box<T> is just a (fat) pointer, so the fields need to be `pointer` and `vtable` instead of `__0: Unique<T>` and `__1: Allocator`.

This is meant as a temporary mitigation until we can make sure that simply treating Box as a regular struct in debuginfo does not cause too much breakage in the ecosystem.

r? ```@wesleywiser```
This was referenced Mar 24, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 25, 2022
Rollup of 5 pull requests

Successful merges:

 - rust-lang#94391 (Fix ice when error reporting recursion errors)
 - rust-lang#94655 (Clarify which kinds of MIR are allowed during which phases.)
 - rust-lang#95179 (Try to evaluate in try unify and postpone resolution of constants that contain inference variables)
 - rust-lang#95270 (debuginfo: Fix debuginfo for Box<T> where T is unsized.)
 - rust-lang#95276 (add diagnostic items for clippy's `trim_split_whitespace`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e039dc8 into rust-lang:master Mar 25, 2022
@rustbot rustbot added this to the 1.61.0 milestone Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) C-bug Category: This is a bug. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants