Stream: git-wasmtime

Topic: wasmtime / issue #9828 [DWARF] Inhertiance `DW_TAG`s drop...


view this post on Zulip Wasmtime GitHub notifications bot (Dec 15 2024 at 20:58):

SingleAccretion opened issue #9828:

Reproduction:
1\) Compile the following C++ to WASM with -g:

struct Base { int BaseValue; };
struct Derived : public Base { int DerivedValue; };

int main()
{
    Derived x;
    x.BaseValue = 2;
    x.DerivedValue = 1;
    return 0;
}

2\) Run under wasmtime+LLDB:

> lldb wasmtime -Ddebug-info -Oopt-level=0 main.wasm
> (lldb) b main
> (lldb) ...
> (lldb) v x.BaseValue

Expected result:

(int) x.BaseValue = 1

Actual result:

error: "BaseValue" is not a member of "(Derived) x"

Cause: DI GC drops correctness-bearing DW_TAG_inheritance DIEs.

Working on a fix...

view this post on Zulip Wasmtime GitHub notifications bot (Dec 15 2024 at 22:24):

SingleAccretion edited issue #9828:

Reproduction:
1\) Compile the following C++ to WASM with -g:

struct Base { int BaseValue; };
struct Derived : public Base { int DerivedValue; };

int main()
{
    Derived x;
    x.BaseValue = 2;
    x.DerivedValue = 1;
    return 0;
}

2\) Run under wasmtime+LLDB:

> lldb wasmtime -Ddebug-info -Oopt-level=0 main.wasm
> (lldb) b main
> (lldb) ...
> (lldb) v x.BaseValue

Expected result:

(int) x.BaseValue = 1

Actual result:

error: "BaseValue" is not a member of "(Derived) x"

Cause: DI GC drops correctness-bearing DW_TAG_inheritance DIEs.

Fix incoming...


Last updated: Dec 23 2024 at 12:05 UTC