Stream: git-wasmtime

Topic: wasmtime / issue #3419 Cranelift: "this" not populated co...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2021 at 14:21):

adv-sw labeled issue #3419:

Unzip test case.

On Linux :

Run make_wasm.sh to build

Optional lldbg debugging front end - tested linux & windows : https://github.com/adv-sw/lldbg
Modify dbg_wasm.sh to run under lldb direct instead of new lldbg front end if you want to skip that.

Run dbg_wasm.sh to run under debugger.

Place breakpoint in test.cpp in Thing constructor on assignment m_i = i;

Start program, hit breakpoint.

Inspect "this"

Expected Results

Should contain single integer member m_i

Actual Results

"this" is empty - not populated correctly.

Console : warning: `this' is not accessible (substituting 0)

Unsure where that's coming from - doesn't seem to be cranelift.

Versions and Environment

Cranelift & wasmtime trunk as of 3/10/21
lldb trunk as of late Sept 21.
lldbg trunk

Operating system: Windows 11 & Ubuntu tested.

Architecture: x64
test.zip

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2021 at 14:21):

adv-sw opened issue #3419:

Unzip test case.

On Linux :

Run make_wasm.sh to build

Optional lldbg debugging front end - tested linux & windows : https://github.com/adv-sw/lldbg
Modify dbg_wasm.sh to run under lldb direct instead of new lldbg front end if you want to skip that.

Run dbg_wasm.sh to run under debugger.

Place breakpoint in test.cpp in Thing constructor on assignment m_i = i;

Start program, hit breakpoint.

Inspect "this"

Expected Results

Should contain single integer member m_i

Actual Results

"this" is empty - not populated correctly.

Console : warning: `this' is not accessible (substituting 0)

Unsure where that's coming from - doesn't seem to be cranelift.

Versions and Environment

Cranelift & wasmtime trunk as of 3/10/21
lldb trunk as of late Sept 21.
lldbg trunk

Operating system: Windows 11 & Ubuntu tested.

Architecture: x64
test.zip

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2021 at 14:21):

adv-sw labeled issue #3419:

Unzip test case.

On Linux :

Run make_wasm.sh to build

Optional lldbg debugging front end - tested linux & windows : https://github.com/adv-sw/lldbg
Modify dbg_wasm.sh to run under lldb direct instead of new lldbg front end if you want to skip that.

Run dbg_wasm.sh to run under debugger.

Place breakpoint in test.cpp in Thing constructor on assignment m_i = i;

Start program, hit breakpoint.

Inspect "this"

Expected Results

Should contain single integer member m_i

Actual Results

"this" is empty - not populated correctly.

Console : warning: `this' is not accessible (substituting 0)

Unsure where that's coming from - doesn't seem to be cranelift.

Versions and Environment

Cranelift & wasmtime trunk as of 3/10/21
lldb trunk as of late Sept 21.
lldbg trunk

Operating system: Windows 11 & Ubuntu tested.

Architecture: x64
test.zip

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2021 at 14:26):

adv-sw edited issue #3419:

Unzip test case.

On Linux :

Run make_wasm.sh to build

Optional lldbg debugging front end - tested linux & windows : https://github.com/adv-sw/lldbg
Modify dbg_wasm.sh to run under lldb direct instead of new lldbg front end if you want to skip that - same command line, just s/lldbg/lldb

Run dbg_wasm.sh to run under debugger.

Place breakpoint in test.cpp in Thing constructor on assignment m_i = i;

Start program, hit breakpoint.

Inspect "this"

Expected Results

Should contain single integer member m_i

Actual Results

"this" is empty - not populated correctly.

Console : warning: `this' is not accessible (substituting 0)

Unsure where that's coming from - doesn't seem to be cranelift.

Versions and Environment

Cranelift & wasmtime trunk as of 3/10/21
lldb trunk as of late Sept 21.
lldbg trunk

Operating system: Windows 11 & Ubuntu tested.

Architecture: x64
test.zip

view this post on Zulip Wasmtime GitHub notifications bot (Oct 05 2021 at 14:30):

adv-sw edited issue #3419:

Unzip test case.

On Linux :

Run make_wasm.sh to build

Optional lldbg debugging front end - tested linux & windows : https://github.com/adv-sw/lldbg
Modify dbg_wasm.sh to run under lldb direct instead of new lldbg front end if you want to skip that - same command line, just s/lldbg/lldb

Run dbg_wasm.sh to run under debugger.

Place breakpoint in test.cpp in Thing constructor on assignment m_i = i;

Start program, hit breakpoint.

Inspect "this"

Expected Results

Should contain single integer member m_i

Actual Results

"this" is empty - not populated correctly.

Console : warning: `this' is not accessible (substituting 0)

Unsure where that's coming from - doesn't seem to be cranelift.

Versions and Environment

Cranelift & wasmtime trunk as of 3/10/21
lldb trunk as of late Sept 21.
lldbg trunk

Operating system: Windows 11 & Ubuntu tested.

Architecture: x64
test.zip

Severe C++ web assembly development productivity issue because webdevs need to be able to effectively debug their code.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 11 2021 at 09:12):

adv-sw commented on issue #3419:

Resolved here.

https://github.com/bytecodealliance/wasmtime/commit/92a10d1ace70fe75c3e2c646ea613168fc417851

Please review/merge.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 11 2021 at 09:41):

adv-sw edited issue #3419:

Unzip test case.

On Linux :

Run make_wasm.sh to build

Optional lldbg debugging front end - tested linux & windows : https://github.com/adv-sw/lldbg
Modify dbg_wasm.sh to run under lldb direct instead of new lldbg front end if you want to skip that - same command line, just s/lldbg/lldb

Run dbg_wasm.sh to run under debugger.

Place breakpoint in test.cpp in Thing constructor on assignment m_i = i;

Start program, hit breakpoint.

Inspect "this"

Expected Results

Should contain single integer member m_i

Actual Results

"this" is empty - not populated correctly.

Console : warning: `this' is not accessible (substituting 0)

LLDB is complaining "this" is not a standard pointer. LLDB refuses to evaluate non-standard this & self pointers.

Hence we need a workaround to resolve from sandbox pointer, which is provided here :

https://github.com/bytecodealliance/wasmtime/commit/92a10d1ace70fe75c3e2c646ea613168fc417851

Versions and Environment

Cranelift & wasmtime trunk as of 3/10/21
lldb trunk as of late Sept 21.
lldbg trunk

Operating system: Windows 11 & Ubuntu tested.

Architecture: x64
test.zip

Severe C++ web assembly development productivity issue because webdevs need to be able to effectively debug their code.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 11 2021 at 15:59):

cfallin commented on issue #3419:

@adv-sw thanks for looking into this! Would you mind creating a PR for the review and merging of your commit? (The usual flow is that one will create this PR with the text "Fixes #ISSUE-NUMBER" in the commit message, which links it back to this issue and closes it when merged.)

view this post on Zulip Wasmtime GitHub notifications bot (Nov 05 2021 at 18:05):

bacongobbler commented on issue #3419:

looks like https://github.com/bytecodealliance/wasmtime/pull/3443 has been merged, so this can be closed.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 05 2021 at 18:23):

cfallin commented on issue #3419:

Yes indeed, thank you for pointing this out!

view this post on Zulip Wasmtime GitHub notifications bot (Nov 05 2021 at 18:23):

cfallin closed issue #3419:

Unzip test case.

On Linux :

Run make_wasm.sh to build

Optional lldbg debugging front end - tested linux & windows : https://github.com/adv-sw/lldbg
Modify dbg_wasm.sh to run under lldb direct instead of new lldbg front end if you want to skip that - same command line, just s/lldbg/lldb

Run dbg_wasm.sh to run under debugger.

Place breakpoint in test.cpp in Thing constructor on assignment m_i = i;

Start program, hit breakpoint.

Inspect "this"

Expected Results

Should contain single integer member m_i

Actual Results

"this" is empty - not populated correctly.

Console : warning: `this' is not accessible (substituting 0)

LLDB is complaining "this" is not a standard pointer. LLDB refuses to evaluate non-standard this & self pointers.

Hence we need a workaround to resolve from sandbox pointer, which is provided here :

https://github.com/bytecodealliance/wasmtime/commit/92a10d1ace70fe75c3e2c646ea613168fc417851

Versions and Environment

Cranelift & wasmtime trunk as of 3/10/21
lldb trunk as of late Sept 21.
lldbg trunk

Operating system: Windows 11 & Ubuntu tested.

Architecture: x64
test.zip

Severe C++ web assembly development productivity issue because webdevs need to be able to effectively debug their code.


Last updated: Oct 23 2024 at 20:03 UTC