zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit f98f5a5f742d3fb4400d288b716feecfc26a8238 (tree)
parent 4ea18c22f958c05aa5c715fc8823d704699746ec
Author: Jacob Young <jacobly0@users.noreply.github.com>
Date:   Fri, 14 Feb 2025 05:42:10 -0500

main: increase thread stack size for non-x86_64 backends

I observed a stack overflow during x86_64 CodeGen in a debug compiler
compiled by the llvm backend.  This happens while compiling
`main.buildOutputType` due to the Air being nested almost 500 levels.

Diffstat:
Msrc/main.zig | 5+----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/main.zig b/src/main.zig @@ -39,10 +39,7 @@ test { _ = Package; } -const thread_stack_size = switch (builtin.zig_backend) { - else => std.Thread.SpawnConfig.default_stack_size, - .stage2_x86_64 => 32 << 20, -}; +const thread_stack_size = 32 << 20; pub const std_options: std.Options = .{ .wasiCwd = wasi_cwd,