Skip to content

Commit 937bd1d

Browse files
committed
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.
1 parent be60383 commit 937bd1d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/main.zig

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,7 @@ test {
3939
_ = Package;
4040
}
4141

42-
const thread_stack_size = switch (builtin.zig_backend) {
43-
else => std.Thread.SpawnConfig.default_stack_size,
44-
.stage2_x86_64 => 32 << 20,
45-
};
42+
const thread_stack_size = 32 << 20;
4643

4744
pub const std_options: std.Options = .{
4845
.wasiCwd = wasi_cwd,

0 commit comments

Comments
 (0)