Skip to content

Core dumps don't handle composed adapters in components #13983

Description

@alexcrichton

This input:

(component
  (component $A
    (core module $m
      (func (export "f") (param i32) (result i32) unreachable)
    )
    (core instance $i (instantiate $m))
    (func (export "f") (param "x" u32) (result u32)
      (canon lift (core func $i "f")))
  )
  (component $B
    (import "f" (func $f (param "x" u32) (result u32)))
    (core func $fl (canon lower (func $f)))
    (core module $m
      (import "" "f" (func $f (param i32) (result i32)))
      (func (export "run") (call $f (i32.const 1)) drop)
    )
    (core instance $i (instantiate $m
      (with "" (instance (export "f" (func $fl))))))
    (func (export "run") (canon lift (core func $i "run")))
  )
  (instance $a (instantiate $A))
  (instance $b (instantiate $B (with "f" (func $a "f"))))
  (func (export "run") (alias export $b "run"))
)

yields:

$ wasmtime run -D coredump=foo.dump --invoke 'run()' composed.wat

thread 'main' (2618762) panicked at crates/wasmtime/src/runtime/coredump.rs:287:54:
no entry found for key
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
zsh: IOT instruction (core dumped)  wasmtime run -D coredump=foo.dump --invoke 'run()' composed.wat

Metadata

Metadata

Assignees

No one assigned

    Labels

    wasmtime:debuggingIssues related to debugging of JIT'ed code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions