alexcrichton opened issue #4162:
Given an input module that looks like:
(module (func $f unreachable) (start $f) )
this will print out:
$ wasmtime run foo.wat Error: failed to run main module `foo.wat` Caused by: 0: failed to instantiate "foo.wat" 1: wasm trap: wasm `unreachable` instruction executed wasm backtrace: 0: 0x1a - <unknown>!float
Here the function name
float
is incorrect in the backtrace. The reason this is due to this automatic demangling.@fitzgen is there perhaps a different way we should invoke
cpp_demangle
to try to only trigger on C++ symbols? (e.g. the Rust_Z
prefix or similar)
bjorn3 commented on issue #4162:
According to https://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangling-structure all mangled C++ names seem to start with
_Z
. IMO cpp_demangle shouldn't attempt to demangle mangled types when usingSymbol::new
.
Last updated: Nov 22 2024 at 16:03 UTC