-
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
Dummy Overlapping Line Program Range produced for WASM Target #79410
Comments
I cannot reproduce this with the provided testcase on Rust 1.62.0. However, the test case is incomplete, so I may not be testing the same thing. @mitsuhiko Which target were you using? I tried with the following Cargo.toml, and [package]
name = "wasm-zero-address"
version = "0.1.0"
edition = "2021"
[lib]
crate-type = ["cdylib"]
[profile.release]
debug = true Here's the result of
|
I can reproduce it with 1.48.0! So it looks like this got indeed fixed. Output with 1.48.0:
|
I wonder if it makes sense to add a regression test to make sure it does not happen again. |
The following minimal WASM example:
Produces a line number program in DWARF with what appears to decode to two overlapping ranges:
The output here is from the gimli dwarfdump tool but you can basically see that from pc
0x00
a sequence is started and ends at0x23
which is the end of the program. The actual functioninternal_func
sits at0x2
and ends at0x5
. Since DWARF does not permit code at0x0
it would appear that rustc pads out the file for two bytes and places "nothing" at0x0
.DWARF does not talk much about overlapping sequences but it does talk about how sequences have to be contiguous:
We currently take advantage of this fact and only consider a single sequence per PC. Right now we accidentally pick up on the first sequence which starts at 0. We can work around this by skipping sequences at zero but it seems to be a bug that this dummy sequence is generated in the first place.
Meta
It also happens on nightly:
The text was updated successfully, but these errors were encountered: