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

debug_assert! problem for wasm-bindgen #681

Closed
namse opened this issue Sep 13, 2023 · 2 comments
Closed

debug_assert! problem for wasm-bindgen #681

namse opened this issue Sep 13, 2023 · 2 comments

Comments

@namse
Copy link

namse commented Sep 13, 2023

Hello. wasm-bindgen and walrus are using this crate, and there is a particular issue that has arisen, which I would like to discuss.

Currently, when generating the DWARF for wasm in wasm-bindgen, there is an assertion debug_assert! that's triggered at the following location: https://github.com/gimli-rs/gimli/blob/master/src/write/line.rs#L467

Could you please confirm whether this debug_assert is a critical assertion that must be true condition?

related issues

@bjorn3
Copy link
Contributor

bjorn3 commented Sep 13, 2023

Line tables use monotonically increasing addresses. There is no opcode to decrease the address of the next row compared to the previous one. If that assertion fires, the user of gimli tried to produce invalid DWARF debuginfo. Without the assertion I would expect an underflow panic to happen in debug mode when calculating the address increment for the current row.

@namse
Copy link
Author

namse commented Sep 17, 2023

Thank you for response. I guess walrus should pass that debug_assert.
I don't have other question so I close this issue.

@namse namse closed this as completed Sep 17, 2023
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

No branches or pull requests

2 participants