You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: failed to run main module `main.wasm`
Caused by:
0: failed to invoke command default
1: error while executing at wasm backtrace:
0: 0x190f - compress.flate.bit_writer.BitWriter(io.GenericWriter(*array_list.ArrayListAligned(u8,null),error{OutOfMemory},(function 'appendWrite'))).init
at /home/falconandy/zig/lib/std/compress/flate/bit_writer.zig:38:13
1: 0x15f4 - compress.flate.block_writer.BlockWriter(io.GenericWriter(*array_list.ArrayListAligned(u8,null),error{OutOfMemory},(function 'appendWrite'))).init
at /home/falconandy/zig/lib/std/compress/flate/block_writer.zig:40:49
2: 0x12a1 - compress.flate.deflate.Deflate(.zlib,io.GenericWriter(*array_list.ArrayListAligned(u8,null),error{OutOfMemory},(function 'appendWrite')),compress.flate.block_writer.BlockWriter(io.GenericWriter(*array_list.ArrayListAligned(u8,null),error{OutOfMemory},(function 'appendWrite')))).init
at /home/falconandy/zig/lib/std/compress/flate/deflate.zig:141:53
3: 0x2426 - compress.flate.deflate.compressor__anon_1861
at /home/falconandy/zig/lib/std/compress/flate/deflate.zig:67:59
4: 0x116cf - compress.flate.deflate.compress__anon_1566
at /home/falconandy/zig/lib/std/compress/flate/deflate.zig:57:27
5: 0x61c - compress.zlib.compress__anon_1549
at /home/falconandy/zig/lib/std/compress/zlib.zig:24:25
6: 0x3cb - main.main
at /home/falconandy/CLionProjects/untitled3/src/main.zig:8:31
7: 0x1bc - start.callMain
at /home/falconandy/zig/lib/std/start.zig:514:22 - start.wasm_freestanding_start
at /home/falconandy/zig/lib/std/start.zig:199:5
2: memory fault at wasm address 0xffde5880 in linear memory of size 0x170000
3: wasm trap: out of bounds memory access
Expected Behavior
No errors.
It looks like wasm32-wasi target works fine:
Zig Version
0.13.0, 0.14.0-dev.2064+b5cafe223
Steps to Reproduce and Observed Behavior
Simplified example with
wasmtime
engine (actually my host environment is web browsers):src/main.zig
:Command:
zig build-exe ./src/main.zig -target wasm32-freestanding && WASMTIME_BACKTRACE_DETAILS=1 wasmtime main.wasm
Output:
Expected Behavior
No errors.
It looks like
wasm32-wasi
target works fine:Command:
zig build-exe ./src/main.zig -target wasm32-wasi && WASMTIME_BACKTRACE_DETAILS=1 wasmtime main.wasm
Output: empty, no errors.
The text was updated successfully, but these errors were encountered: