Skip to content

Wazero enumerable does not support instance reuse #71

@AndrewSisley

Description

@AndrewSisley

Wazero enumerable does not support instance reuse within the same enumerable/pipe chain.

i.e. the below will not work:

instance, err := engine.NewInstance(module)
if err != nil {
    t.Error(err)
}

pipe := engine.Append[Value, Value](source, instance)
pipe = engine.Append[Value, Value](pipe, instance)
pipe = engine.Append[Value, Value](pipe, instance)

and will throw the following error:

runtime error: invalid memory address or nil pointer dereference (recovered by wazero)

Creating new instances for each Append call works fine, other runtimes work fine. We have a decent number of tests that fail using the wazero runtime because of this, e.g. TestWasm32PipelineFromSourceAsFullToModuleAsFullToModuleAsFull.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions