Skip to content

AssemblyScript example optimized version fails #73

Description

@tolauwae

Trying to run the AssemblyScript example without the mqtt fails. (= programming demo example)

When the busy loop is empty, binaryen optimizes away callback functions. It eliminates the funcref table and passes the function's own index to the subscribe_interrupt primitive.

    while (true) {    
        wd.sleep(5); // Sleep for 5 seconds    
    }

The resulting index is obviously out of range since there is no table. This causes an unhandled exception whenever the VM wants to resolve an event.

It seems users of Asyncify have run into similar problems: WebAssembly/binaryen#4484

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions