gimli-rs / gimli

A library for reading and writing the DWARF debugging format

Home Page:https://docs.rs/gimli/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`debug_assert!` problem for wasm-bindgen

namse opened this issue · comments

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

commented

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.

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