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 for function ZSTs should have alignment of 8 bits, not 1 bit #136640

Merged
merged 1 commit into from
Feb 8, 2025

Conversation

Zalathar
Copy link
Contributor

@Zalathar Zalathar commented Feb 6, 2025

In #116096, function ZSTs were made to have debuginfo that gives them an alignment of “1”. But because alignment in LLVM debuginfo is denoted in bits, not bytes, this resulted in an alignment specification of 1 bit instead of 1 byte.

I don't know whether this has any practical consequences, but I noticed that a test started failing when I accidentally fixed the mistake while working on #136632, so I extracted the fix (and the test adjustment) to this PR.

@rustbot
Copy link
Collaborator

rustbot commented Feb 6, 2025

r? @compiler-errors

rustbot has assigned @compiler-errors.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 6, 2025
@Zalathar Zalathar added the A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) label Feb 6, 2025
@compiler-errors
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 6, 2025

📌 Commit 4385a9e has been approved by compiler-errors

It is now in the queue for this repository.

@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 Feb 6, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 7, 2025
…ompiler-errors

Debuginfo for function ZSTs should have alignment of 8 bits, not 1 bit

In rust-lang#116096, function ZSTs were made to have debuginfo that gives them an alignment of “1”. But because alignment in LLVM debuginfo is denoted in *bits*, not bytes, this resulted in an alignment specification of 1 bit instead of 1 byte.

I don't know whether this has any practical consequences, but I noticed that a test started failing when I accidentally fixed the mistake while working on rust-lang#136632, so I extracted the fix (and the test adjustment) to this PR.
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 7, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#136640 (Debuginfo for function ZSTs should have alignment of 8 bits, not 1 bit)
 - rust-lang#136648 (Add a missing `//@ needs-symlink` to `tests/run-make/libs-through-symlinks`)
 - rust-lang#136651 (Label mismatched parameters at the def site for foreign functions)
 - rust-lang#136659 (Pick the max DWARF version when LTO'ing modules with different versions )
 - rust-lang#136691 (Remove Linkage::Private and Linkage::Appending)
 - rust-lang#136692 (add module level doc for bootstrap:utils:exec)
 - rust-lang#136700 (i686-unknown-hurd-gnu: bump baseline CPU to Pentium 4)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 8, 2025
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#136640 (Debuginfo for function ZSTs should have alignment of 8 bits, not 1 bit)
 - rust-lang#136648 (Add a missing `//@ needs-symlink` to `tests/run-make/libs-through-symlinks`)
 - rust-lang#136651 (Label mismatched parameters at the def site for foreign functions)
 - rust-lang#136691 (Remove Linkage::Private and Linkage::Appending)
 - rust-lang#136692 (add module level doc for bootstrap:utils:exec)
 - rust-lang#136700 (i686-unknown-hurd-gnu: bump baseline CPU to Pentium 4)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 8, 2025
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#136640 (Debuginfo for function ZSTs should have alignment of 8 bits, not 1 bit)
 - rust-lang#136648 (Add a missing `//@ needs-symlink` to `tests/run-make/libs-through-symlinks`)
 - rust-lang#136651 (Label mismatched parameters at the def site for foreign functions)
 - rust-lang#136691 (Remove Linkage::Private and Linkage::Appending)
 - rust-lang#136692 (add module level doc for bootstrap:utils:exec)
 - rust-lang#136700 (i686-unknown-hurd-gnu: bump baseline CPU to Pentium 4)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 93b1945 into rust-lang:master Feb 8, 2025
6 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Feb 8, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 8, 2025
Rollup merge of rust-lang#136640 - Zalathar:debuginfo-align-bits, r=compiler-errors

Debuginfo for function ZSTs should have alignment of 8 bits, not 1 bit

In rust-lang#116096, function ZSTs were made to have debuginfo that gives them an alignment of “1”. But because alignment in LLVM debuginfo is denoted in *bits*, not bytes, this resulted in an alignment specification of 1 bit instead of 1 byte.

I don't know whether this has any practical consequences, but I noticed that a test started failing when I accidentally fixed the mistake while working on rust-lang#136632, so I extracted the fix (and the test adjustment) to this PR.
@Zalathar Zalathar deleted the debuginfo-align-bits branch February 8, 2025 23:20
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.) 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.

4 participants