-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Description
Description
When running ipython in WebVM, CheerpX's JIT compiler produces invalid WebAssembly, causing compilation failures and triggering fail.wasm downloads.
Steps to Reproduce
- Build an Alpine-based WebVM image with ipython installed (
pip install ipython) - Boot the VM and run
ipython - Observe console errors
Error Output
CompileError: WebAssembly.compile(): Compiling function #8 failed: expected 0 elements on the stack for fallthru, found 1 @+35000
Uncaught CompileError: WebAssembly.Module(): Compiling function #0 failed: expected 0 elements on the stack for fallthru, found 1 @+7503
at aog (3ed10a5f-2986-4e86-83f5-79758cd9d49b:1:15612)
at 0073be8a:0xf168a
at 0073be8a:0x3dba0
at MessagePort.Iv (3ed10a5f-2986-4e86-83f5-79758cd9d49b:1:60559)
Multiple similar errors follow with different offsets (+6262, +6771, +5806, +5887).
Environment
- Base image:
i386/alpine:edge - Python: 3.12
- ipython: 9.10.0 (latest)
- Browser: Chrome 144.0.7559.97
Analysis
The error indicates the JIT-compiled WASM has invalid stack behavior ("expected 0 elements on the stack for fallthru, found 1"). This appears to be triggered by specific x86 code paths in ipython/Python that produce invalid WASM during JIT compilation.
The fail.wasm download is CheerpX's fallback mechanism when compilation fails.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels