bytecodealliance / bytecodealliance/wasmtime

DWARF reference translation bug

Open
#2,078 4 comments 1 reaction 0 assignees View on GitHub
bug wasmtime:debugging
Dominant language
Rust
Stars
18.6k
Forks
1.8k
Avg merge
1d 18h
Merged PRs (30d)
126

Description

Here is the file for the reproduction:
[sumsX.wasm.zip](https://github.com/bytecodealliance/wasmtime/files/4995252/sumsX.wasm.zip)

Compile `sumsX.wasm`:
```
wasmtime wasm2obj -g sumsX.wasm sumsX.o
```
Now inspect the DWARF in `sumsX.o`:
```
llvm-dwarfdump -debug-info sumsX.o | less
```
Search for `dayX`.
You'll find 2 occurrences:
- as a parameter to subprogram `spell` (this is good), ~~with a bogus type: `WebAssemblyRefWrapper`~~
- as a parameter to subprogram `Text.compare_eq` (this is bogus).

My suspicion is that the output-side DIEs are wrongly linked. Maybe an off-by-many error, or an iterator invalidation problem?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.