aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorXavier Bouchoux <xavierb@gmail.com>2023-07-10 19:04:10 +0000
committerAndrew Kelley <andrew@ziglang.org>2023-07-11 00:17:08 -0700
commit7a8002a5cf8e6607c1a2bfbd12fec3e60390fc71 (patch)
tree6a05097ab20158a0f52afbfa85f9283fe3c6daaf /src
parentdbc560904aa5570648709cb392204f25884dddd8 (diff)
downloadzig-7a8002a5cf8e6607c1a2bfbd12fec3e60390fc71.tar.gz
zig-7a8002a5cf8e6607c1a2bfbd12fec3e60390fc71.zip
remove arbitrary stderr size limit when spawning a child process tool
Diffstat (limited to 'src')
-rw-r--r--src/Compilation.zig4
-rw-r--r--src/link/Coff/lld.zig2
-rw-r--r--src/link/Elf.zig2
-rw-r--r--src/link/Wasm.zig2
-rw-r--r--src/mingw.zig5
5 files changed, 5 insertions, 10 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig
index 4e0a36d652..91747e8b01 100644
--- a/src/Compilation.zig
+++ b/src/Compilation.zig
@@ -4067,9 +4067,7 @@ fn updateCObject(comp: *Compilation, c_object: *CObject, c_obj_prog_node: *std.P
try child.spawn();
- const stderr_reader = child.stderr.?.reader();
-
- const stderr = try stderr_reader.readAllAlloc(arena, 10 * 1024 * 1024);
+ const stderr = try child.stderr.?.reader().readAllAlloc(arena, std.math.maxInt(usize));
const term = child.wait() catch |err| {
return comp.failCObj(c_object, "unable to spawn {s}: {s}", .{ argv.items[0], @errorName(err) });
diff --git a/src/link/Coff/lld.zig b/src/link/Coff/lld.zig
index 6be20efe11..800b128081 100644
--- a/src/link/Coff/lld.zig
+++ b/src/link/Coff/lld.zig
@@ -545,7 +545,7 @@ pub fn linkWithLLD(self: *Coff, comp: *Compilation, prog_node: *std.Progress.Nod
try child.spawn();
- const stderr = try child.stderr.?.reader().readAllAlloc(arena, 10 * 1024 * 1024);
+ const stderr = try child.stderr.?.reader().readAllAlloc(arena, std.math.maxInt(usize));
const term = child.wait() catch |err| {
log.err("unable to spawn {s}: {s}", .{ argv.items[0], @errorName(err) });
diff --git a/src/link/Elf.zig b/src/link/Elf.zig
index 8d08b73d6a..0258b0a6a7 100644
--- a/src/link/Elf.zig
+++ b/src/link/Elf.zig
@@ -1949,7 +1949,7 @@ fn linkWithLLD(self: *Elf, comp: *Compilation, prog_node: *std.Progress.Node) !v
try child.spawn();
- const stderr = try child.stderr.?.reader().readAllAlloc(arena, 10 * 1024 * 1024);
+ const stderr = try child.stderr.?.reader().readAllAlloc(arena, std.math.maxInt(usize));
const term = child.wait() catch |err| {
log.err("unable to spawn {s}: {s}", .{ argv.items[0], @errorName(err) });
diff --git a/src/link/Wasm.zig b/src/link/Wasm.zig
index b35ed0d26b..429fc12f14 100644
--- a/src/link/Wasm.zig
+++ b/src/link/Wasm.zig
@@ -4529,7 +4529,7 @@ fn linkWithLLD(wasm: *Wasm, comp: *Compilation, prog_node: *std.Progress.Node) !
try child.spawn();
- const stderr = try child.stderr.?.reader().readAllAlloc(arena, 10 * 1024 * 1024);
+ const stderr = try child.stderr.?.reader().readAllAlloc(arena, std.math.maxInt(usize));
const term = child.wait() catch |err| {
log.err("unable to spawn {s}: {s}", .{ argv.items[0], @errorName(err) });
diff --git a/src/mingw.zig b/src/mingw.zig
index 318556376e..39059f804a 100644
--- a/src/mingw.zig
+++ b/src/mingw.zig
@@ -379,10 +379,7 @@ pub fn buildImportLib(comp: *Compilation, lib_name: []const u8) !void {
try child.spawn();
- const stderr_reader = child.stderr.?.reader();
-
- // TODO https://github.com/ziglang/zig/issues/6343
- const stderr = try stderr_reader.readAllAlloc(arena, 10 * 1024 * 1024);
+ const stderr = try child.stderr.?.reader().readAllAlloc(arena, std.math.maxInt(usize));
const term = child.wait() catch |err| {
// TODO surface a proper error here