aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorJosh Wolfe <thejoshwolfe@gmail.com>2024-04-06 04:24:00 -0400
committerJosh Wolfe <thejoshwolfe@gmail.com>2024-04-06 04:24:00 -0400
commit3eeb70540d7f40526b4f4549deb6e2bc792bb3b2 (patch)
tree5e2ed87bae075a629ba8d38cb25627538fab520e /src/main.zig
parent05b185811e7427296bc6b6231d0b7f882f118d38 (diff)
downloadzig-3eeb70540d7f40526b4f4549deb6e2bc792bb3b2.tar.gz
zig-3eeb70540d7f40526b4f4549deb6e2bc792bb3b2.zip
fix number of arguments preallocation in zig jit subcommand
crash repo: `zig std 1 2 3 4 5` (in a debug build)
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.zig b/src/main.zig
index 9e699c07e6..e6eb60138b 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -5402,7 +5402,7 @@ fn jitCmd(
defer thread_pool.deinit();
var child_argv: std.ArrayListUnmanaged([]const u8) = .{};
- try child_argv.ensureUnusedCapacity(arena, args.len + 2);
+ try child_argv.ensureUnusedCapacity(arena, args.len + 4);
// We want to release all the locks before executing the child process, so we make a nice
// big block here to ensure the cleanup gets run when we extract out our argv.