bjorn3 added the bug label to Issue #9300.
bjorn3 opened issue #9300:
Test Case
Any wasm module.
Steps to Reproduce
wasmtime run -Ddebug-info=y /path/to/wasm
gdb -p $(pidof wasmtime)
Expected Results
Gdb doesn't emit any warnings.
Actual Results
Gdb emits the following warnings:
warning: Loadable section ".wasmtime.engine" outside of ELF segments in <in-memory@0x7fdb64515010> warning: Loadable section ".wasmtime.bti" outside of ELF segments in <in-memory@0x7fdb64515010> warning: Loadable section ".eh_frame" outside of ELF segments in <in-memory@0x7fdb64515010> warning: Loadable section ".wasmtime.addrmap" outside of ELF segments in <in-memory@0x7fdb64515010> warning: Loadable section ".wasmtime.traps" outside of ELF segments in <in-memory@0x7fdb64515010> warning: Loadable section ".rodata.wasm" outside of ELF segments in <in-memory@0x7fdb64515010> warning: Loadable section ".name.wasm" outside of ELF segments in <in-memory@0x7fdb64515010> warning: Loadable section ".wasmtime.info" outside of ELF segments in <in-memory@0x7fdb64515010>
Versions and Environment
Wasmtime version or commit: v16.0.0, but almost certainly reproduces with current Wasmtime given that I can't see any recent changes to the relevant code.
Operating system: Linux
Architecture: x86_64
Extra Info
This can probably be fixed by either clearing the loadable flag of all these sections or adding them to actual segments in case they are meant to be used at runtime like in the case of
.eh_frame
and.rodata.wasm
.
bjorn3 edited issue #9300:
Test Case
Any wasm module.
Steps to Reproduce
wasmtime run -Ddebug-info=y /path/to/wasm
gdb -p $(pidof wasmtime)
Expected Results
Gdb doesn't emit any warnings.
Actual Results
Gdb emits the following warnings:
warning: Loadable section ".wasmtime.engine" outside of ELF segments in <in-memory@0x7f21a5259010> warning: Loadable section ".wasmtime.bti" outside of ELF segments in <in-memory@0x7f21a5259010> warning: Loadable section ".eh_frame" outside of ELF segments in <in-memory@0x7f21a5259010> warning: Loadable section ".wasmtime.addrmap" outside of ELF segments in <in-memory@0x7f21a5259010> warning: Loadable section ".wasmtime.traps" outside of ELF segments in <in-memory@0x7f21a5259010> warning: Loadable section ".rodata.wasm" outside of ELF segments in <in-memory@0x7f21a5259010> warning: Loadable section ".name.wasm" outside of ELF segments in <in-memory@0x7f21a5259010> warning: Loadable section ".wasmtime.info" outside of ELF segments in <in-memory@0x7f21a5259010>
Versions and Environment
Wasmtime version or commit: v25.0.0
Operating system: Linux
Architecture: x86_64
Extra Info
This can probably be fixed by either clearing the loadable flag of all these sections or adding them to actual segments in case they are meant to be used at runtime like in the case of
.eh_frame
and.rodata.wasm
.
alexcrichton commented on issue #9300:
I suspect the fix is that in this file our usage of
SectionKind::ReadOnlyData
is probably all wrong and it may want to be something likeSectionKind::Metadata
or similar. Wasmtime doesn't use these flags at all so the choice of kind here is basically arbitrary from Wasmtime's perspective, but it'd be great to remove these warnings and get a "more correct" elf file too! Would you be able to test outSectionKind::Metadata
and see if gdb still emits these warnings?
Last updated: Nov 22 2024 at 17:03 UTC