cloudflare / cloudflare/workerd

Bug Report: workerd crashes in --jitless mode / when wasm is unavailable

Open
#5,505 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
8.7k
Forks
739
Avg merge
2d 20h
Merged PRs (30d)
174

Description

workerd crashes whenever the --jitless flag is passed in v8Flags.

V8 doesn't support WASM in interpreter mode so globalThis.WebAssembly is not exposed, but workerd assumes it’s present and unconditionally reads WebAssembly.Module during context setup, which throws and aborts.

```
> workerd-jitless-repro@0.0.0 start:jitless
> workerd serve ./config.jitless.capnp --socket-addr http=0.0.0.0:${PORT:-8787} --verbose

Uncaught TypeError: Cannot read properties of undefined (reading 'Module')

FROM
zsh: trace trap npm run start:jitless
```

Is this outside the scope of supported ways to run worked? I looked for a flag to disable WebAssembly module use or polyfill away the WebAssembly global, but couldn't find one.

Repro: https://github.com/raykyri/workerd-jitless-repro

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.