Stream: git-wasmtime

Topic: wasmtime / issue #4162 Wasmtime is too eager to use C++ n...


view this post on Zulip Wasmtime GitHub notifications bot (May 18 2022 at 18:01):

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)

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2022 at 18:17):

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 using Symbol::new.


Last updated: Oct 23 2024 at 20:03 UTC