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

bugfix: DWARF transformation failure in some code #253

Merged
merged 5 commits into from
Nov 10, 2023

Conversation

nokotan
Copy link
Contributor

@nokotan nokotan commented Nov 9, 2023

Resolves: #247

In the original PR (#231), once the debug program sequence begins, it tries to convert any address in original wasm binaries, even if the address is not mapped in transformed wasm binaries.

That is based on the assumption that any consequence address is existent in transformed binary, if sequence-beginning address can be mapped to transformed one. However, the assumption seems not to be correct especially in inline functions.

In this PR, all addresses that convert function cannot converted are just ignored in DWARF line program converting process.

@guybedford
Copy link
Collaborator

I just tested this against the previous bug in rustwasm/wasm-bindgen#3483 and can confirm this resolves the issue.

@guybedford guybedford merged commit 22ecf36 into rustwasm:main Nov 10, 2023
8 checks passed
@d3lm
Copy link

d3lm commented Nov 15, 2023

Thanks a ton for this PR @nokotan 🙏

@squillace
Copy link

Agreed! Thanks a ton, @nokotan !!! This is going to have a huge impact if we can use this now: https://marketplace.visualstudio.com/items?itemName=ms-vscode.wasm-dwarf-debugging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid debug offset invariant
4 participants