From f98f5a5f742d3fb4400d288b716feecfc26a8238 Mon Sep 17 00:00:00 2001 From: Jacob Young Date: Fri, 14 Feb 2025 05:42:10 -0500 Subject: [PATCH] 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. --- src/main.zig | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main.zig b/src/main.zig index ce04a92765..773426dab9 100644 --- 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,