Skip to content

Trap's message "note" is a bit misleading #90

Description

@srenatus

Without any env vars set, I get this:

wasm trap: out of bounds memory access
wasm backtrace:
    0: 0x4f3d - <unknown>!opa_value_length
    1: 0x2528 - <unknown>!opa_json_writer_emit_set_literal
    2: 0x22c7 - <unknown>!opa_json_writer_emit_value
    3: 0x27bc - <unknown>!opa_json_writer_write
    4: 0x28f8 - <unknown>!opa_value_dump
    5:  0x791 - <unknown>!opa_eval
note: run with `WASMTIME_BACKTRACE_DETAILS=1` environment variable to display more information

Setting WASMTIME_BACKTRACE_DETAILS=1, I get the same message without the note:

wasm trap: out of bounds memory access
wasm backtrace:
    0: 0x4f3d - <unknown>!opa_value_length
    1: 0x2528 - <unknown>!opa_json_writer_emit_set_literal
    2: 0x22c7 - <unknown>!opa_json_writer_emit_value
    3: 0x27bc - <unknown>!opa_json_writer_write
    4: 0x28f8 - <unknown>!opa_value_dump
    5:  0x791 - <unknown>!opa_eval

Another nitpick is the comment on Message,

wasmtime-go/trap.go

Lines 48 to 49 in ef5be5d

// Message returns the name in the module this export type is exporting
func (t *Trap) Message() string {

doesn't seem quite correct 🤔

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions