-
Notifications
You must be signed in to change notification settings - Fork 66
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
Invalid debug offset invariant #247
Comments
I'd like to tackle this - but beware I have not done system-level programming for quite some time. My main motivation is gaining experience in the rust ecosystem in general. What I did so far:
I'll now go on with generating some ELF debug-built object files (I failed to cross-compile a hello world...) and then using dwex in the hope of gaining insight. I'd appreciate resources about line programs. |
@Stefan-Hanke good luck! As I say I suspect the issue is somewhere in the offset handling code landed in the original PR that added this work, the |
Is there any progress on this? I really think that having DWARF symbols for wasm-bindgen would be a really good addition an would drastically help with debugging. |
Is there anything we can do to help finish this off here? I'd love to have rust support in vscode: rustwasm/wasm-bindgen#2389 (comment) |
@squillace I'll gladly review any contribution to a bug fix. This issue should still have the required context to investigate further. |
Replication instructions in rustwasm/wasm-bindgen#3483 (comment).
The last instruction address from https://github.com/rustwasm/walrus/blob/main/src/module/debug/dwarf.rs#L214 ends up being after the subsequent function end address in https://github.com/rustwasm/walrus/blob/main/src/module/debug/dwarf.rs#L210.
Basic logging provides:
Where the broken invariant is then that
4909 < 4042
does not hold.I tested the original PR and it also throws the exact same assertion so this was not an issue with the rebasing.
We maintain separate offset tables for the functions and instructions, and in this case, the instruction offsets are not present so we are falling back to the new
None
path in theconvert_address
function (which was not a part of the original Gimli implementation this came from that instead errored).Separately, it's worth noting there's a language translation issue in the implementation where
Instrument
is used instead ofInstruction
, which might help code understanding to know.The text was updated successfully, but these errors were encountered: