| ... | ... | @@ -1374,6 +1374,7 @@ fn sendRunFuzzTestMessage( |
| 1374 | 1374 | } |
| 1375 | 1375 | } |
| 1376 | 1376 | |
| 1377 | /// Uses `arena` to allocate the result. |
| 1377 | 1378 | fn evalGeneric( |
| 1378 | 1379 | arena: Allocator, |
| 1379 | 1380 | run_index: Configuration.Step.Index, |
| ... | ... | @@ -1382,7 +1383,6 @@ fn evalGeneric( |
| 1382 | 1383 | ) !EvalGenericResult { |
| 1383 | 1384 | const graph = maker.graph; |
| 1384 | 1385 | const io = graph.io; |
| 1385 | | const gpa = maker.gpa; |
| 1386 | 1386 | const conf = &maker.scanned_config.configuration; |
| 1387 | 1387 | const conf_step = run_index.ptr(conf); |
| 1388 | 1388 | const conf_run = conf_step.extended.get(conf.extra).run; |
| ... | ... | @@ -1436,8 +1436,7 @@ fn evalGeneric( |
| 1436 | 1436 | if (child.stderr) |stderr| { |
| 1437 | 1437 | var multi_reader_buffer: Io.File.MultiReader.Buffer(2) = undefined; |
| 1438 | 1438 | var multi_reader: Io.File.MultiReader = undefined; |
| 1439 | | multi_reader.init(gpa, io, multi_reader_buffer.toStreams(), &.{ stdout, stderr }); |
| 1440 | | defer multi_reader.deinit(); |
| 1439 | multi_reader.init(arena, io, multi_reader_buffer.toStreams(), &.{ stdout, stderr }); |
| 1441 | 1440 | |
| 1442 | 1441 | const stdout_reader = multi_reader.reader(0); |
| 1443 | 1442 | const stderr_reader = multi_reader.reader(1); |
| ... | ... | @@ -1457,9 +1456,7 @@ fn evalGeneric( |
| 1457 | 1456 | |
| 1458 | 1457 | try multi_reader.checkAnyError(); |
| 1459 | 1458 | |
| 1460 | | // TODO: this string can leak since alloc below can return error. |
| 1461 | 1459 | stdout_bytes = try multi_reader.toOwnedSlice(0); |
| 1462 | | // TODO: this string can leak since its allocated using gpa and `try child.wait(io)` below can fail. |
| 1463 | 1460 | stderr_bytes = try multi_reader.toOwnedSlice(1); |
| 1464 | 1461 | } else { |
| 1465 | 1462 | var stdout_reader = stdout.readerStreaming(io, &.{}); |
| ... | ... | @@ -2201,7 +2198,7 @@ fn spawnChildAndCollect( |
| 2201 | 2198 | try setColorEnvironmentVariables(&conf_run, environ_map, terminal_mode); |
| 2202 | 2199 | |
| 2203 | 2200 | const started: Io.Clock.Timestamp = .now(io, .awake); |
| 2204 | | const result = evalGeneric(arena, run_index, maker, spawn_options) catch |err| switch (err) { |
| 2201 | const result = evalGeneric(graph.arena, run_index, maker, spawn_options) catch |err| switch (err) { |
| 2205 | 2202 | error.Canceled => |e| return e, |
| 2206 | 2203 | else => |e| e, |
| 2207 | 2204 | }; |