fix: preserve bitfield width during integer promotion - #299
Merged
Conversation
swananan
marked this pull request as ready for review
September 6, 2026 04:59
swananan
force-pushed
the
fix/bind-globals-before-projection
branch
from
September 6, 2026 07:46
28e9c89 to
da7727f
Compare
swananan
force-pushed
the
fix/bitfield-integer-promotion
branch
from
September 6, 2026 09:32
957f16e to
543e64d
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Unsigned 25–31-bit fields lost their declared width before integer promotion and were treated as unsigned 32-bit values. Comparing them with a DWARF
intvalued-1, or applying bitwise NOT, division, and remainder, could disagree with the native C program.Retain the bitfield value width until promotion. Fields whose values fit in
intpromote to signed 32-bit integers; full-width unsigned fields retain unsigned semantics. The change is rebased onto current main and contains one commit touching three files.Validation:
cargo fmt --alland full workspace Clippy with CI warning settings passed.543e64d, including Standard E2E (347 tests), three full container topologies, host-PID smoke, and the DWARF performance check. The Standard E2E log confirms both new regressions ran and the Rust globals fixture was rebuilt with Rust 1.98.