You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been working on a tool that parses DWARF debug info embedded in WebAssembly binaries. The files I'm examining are optimized for size using wasm-opt -Oz -g. I've run into an issue where the address ranges of inlined subroutines will occasionally be impossibly large. Specifically, I'll find a DW_TAG_inlined_subroutine entry with a reasonable DW_AT_low_pc paired with a DW_AT_high_pc with a value of precisely 0x100000000. (Needless to say, the subroutine in question is not actually four gigabytes large.)
I encountered the issue on a bigger codebase, but I've narrowed it down to this simple program that reproduces the issue:
I don't know the specific cause, but it only happens to code optimized by wasm-opt; clang's output is unaffected. It also only seems to affect DW_TAG_inlined_subroutine DIEs, from what I can tell.
The text was updated successfully, but these errors were encountered:
Our DWARF support is not very robust at this time, so this is likely hitting some limitation there. In general I'd recommend using source maps for tracking debug info, as our support for that is very stable. However, if you or someone else is interested to investigate and fix issues like this, that would be welcome of course.
I've been working on a tool that parses DWARF debug info embedded in WebAssembly binaries. The files I'm examining are optimized for size using
wasm-opt -Oz -g
. I've run into an issue where the address ranges of inlined subroutines will occasionally be impossibly large. Specifically, I'll find aDW_TAG_inlined_subroutine
entry with a reasonableDW_AT_low_pc
paired with aDW_AT_high_pc
with a value of precisely 0x100000000. (Needless to say, the subroutine in question is not actually four gigabytes large.)I encountered the issue on a bigger codebase, but I've narrowed it down to this simple program that reproduces the issue:
Compile and optimize like so:
The bug can be confirmed using llvm-dwarfdump:
I don't know the specific cause, but it only happens to code optimized by wasm-opt; clang's output is unaffected. It also only seems to affect
DW_TAG_inlined_subroutine
DIEs, from what I can tell.The text was updated successfully, but these errors were encountered: