Skip to content

wasm has a max stack size of ~66K #3735

Description

@fengb

Easiest to reproduce with the WASI test patches:

$ zig test wasi.zig -target wasm32-wasi --test-cmd wasmtime --test-cmd-bin

conststd=@import("std");
test"safe" {
varbuf: [64000]u8=undefined;
std.debug.warn("{*}\n", &buf);
}
test"broken in debug" {
varbuf: [65000]u8=undefined;
std.debug.warn("{*}\n", &buf);
}
test"broken in release-safe" {
varbuf: [66000]u8=undefined;
std.debug.warn("{*}\n", &buf);
}
test"broken in release-fast" {
varbuf: [68000]u8=undefined;
std.debug.warn("{*}\n", &buf);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    arch-wasm32-bit and 64-bit WebAssemblycontributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions