Skip to content

Asyncify pass does not terminate on a large WASM module while other wasm-opt passes complete #8927

Description

@Rawan10101

Environment

  • Binaryen version: 130
  • Emscripten: 6.0.2
  • Platform: Ubuntu 22.04 (WSL2)
  • Target: wasm32-emscripten

Problem

The Asyncify pass appears to never finish on a generated WASM module. While other wasm-opt passes complete successfully on the exact same module, but --asyncify never terminates or at least does not complete after an extended period while continuously consuming CPU.

Reproduction

The following command completes successfully:

wasm-opt nvim.wasm -O2 -o /tmp/out.wasm

The following command never finishes:

wasm-opt nvim.wasm --asyncify -o /tmp/out.wasm

I also observed the same behavior when invoked through Emscripten during linking with -sASYNCIFY=1.

Additional information

The module characteristics are approximately:

  • Binary size: about 344 KB
  • Functions: 7943
  • Locals: 80012

Output from wasm-opt --metrics:

[exports]      : 55
[funcs]        : 7943
[globals]      : 8
[imports]      : 88
[memories]     : 1
[memory-data]  : 3029640
[tables]       : 1
[vars]         : 80012

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions