Skip to content

Commit

Permalink
main: increase thread stack size for non-x86_64 backends
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jacobly0 committed Feb 14, 2025
1 parent d195dd5 commit 5965a5d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5965a5d

Please sign in to comment.