Hi everyone,
Somewhat puzzled by an issue that started happening in my CI environment, but which I cannot reproduce locally (and thus can't really investigate): on wasmtime_module_new
, I'm getting a Debug information error
with the following description: "The end offset of a location list entry must not be before the beginning."
Would anybody have any hints on what this error is all about? TIA!
This appears to come from gimli's InvalidLocationAddressRange
error. so perhaps the DWARF information in the module is incorrect? Do you know what was used to produce the module?
Hi Peter; thanks! Must be it; The module is cleaned+built on each run with a fresh minimal rustup install of Rust 1.52.0-nightly (linux-gnu f98721f88 2021-03-10) with the wasm32-unknown-unknown
target
Hmm, I think we should be bypassing parsing of the debug sections unless WASMTIME_BACKTRACE_DETAILS=1
is in the environment (I don't think this is controllable from the C API, sadly)
Oh, I just reproduced locally after updating: nightly-x86_64-unknown-linux-gnu updated - rustc 1.52.0-nightly (f98721f88 2021-03-10) (from rustc 1.52.0-nightly (4f20caa62 2021-03-01))
(I just double checked, no WASMTIME_*
or RUST*
env variable set)
oh you also have to disable generating DWARF for the JIT too it seems
that is actually controllable from the C API with wasmtime_config_debug_info_set
, try setting that to false and seeing if the module compiles
if this only reproduces on nightly, i'm guessing there's some bug causing bad DWARF
in this case, specifically in the .debug_loclists
section
Ah, I completely forgot I had this on; yes indeed, the module load without it
So a temporary situation, would you say? Given it is nightly
one would hope; probably an LLVM bug to track down, but it could also be a bug in gimli's parser (this function, at least, hasn't been touched in 2 years; so I'd definitely lean LLVM)
Understood, thanks @Peter Huene, much helpful!
If possible, would you mind filing an issue in the wasmtime repo and attach the problematic module? One of us can probably track down what's invalid in the debug section at least and follow up with the relevant downstream project
Will do!
Last updated: Nov 22 2024 at 16:03 UTC