diff options
author | Alon Zakai <azakai@google.com> | 2021-03-18 11:41:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-18 11:41:51 -0700 |
commit | 647ef50fc4de9b5c49ffad1aec4271e79b171785 (patch) | |
tree | 7a84ea338982d1fbfeb19c7163984c6b93416698 /src/wasm/wasm-io.cpp | |
parent | 8ea6e13fe18b69419411edfd979ce15302820da2 (diff) | |
download | binaryen-647ef50fc4de9b5c49ffad1aec4271e79b171785.tar.gz binaryen-647ef50fc4de9b5c49ffad1aec4271e79b171785.tar.bz2 binaryen-647ef50fc4de9b5c49ffad1aec4271e79b171785.zip |
Ignore missing CUs in DWARF rewriting (#3700)
A recent change in LLVM causes it to sometimes end up with a thing
with no parent. That is, a debug_line or a debug_loc that has no CU that
refers to it. This is perhaps LLVM DCEing CUs, or something else that
changed - not sure. But it seems like valid DWARF we should handle.
This PR handles that in our code. Two things broke here. First, locs must
be simply ignored when there is no CU. Second, lines are trickier as we
used to compute their position by scanning them, and that list contained
only ones with a CU. So we missed some and ended up with wrong offsets.
To make things simpler and more robust, just track the position of each
line table on itself.
Fixes #3697
Diffstat (limited to 'src/wasm/wasm-io.cpp')
0 files changed, 0 insertions, 0 deletions