authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-09-18 16:20:14-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-09-19 19:08:25+02:00
logc8ffaf62e8482de7dac2cc8531118b54989efeeb
tree7fcb2ff37ddb25e3264d4fdd3ea7b21996356f67
parent3f6a02acdda41190eab7d57a9f037df9d4853631

Maker: fix Run step fuzz test list memory leak


2 files changed, 23 insertions(+), 0 deletions(-)

lib/compiler/Maker/Step.zig+19
...@@ -315,6 +315,25 @@ pub fn deinit(step: *Step, gpa: Allocator) void {...@@ -315,6 +315,25 @@ pub fn deinit(step: *Step, gpa: Allocator) void {
315 step.clearErrorBundle(gpa);315 step.clearErrorBundle(gpa);
316 step.inputs.deinit(gpa);316 step.inputs.deinit(gpa);
317 if (step.getZigProcess()) |zp| gpa.destroy(zp);317 if (step.getZigProcess()) |zp| gpa.destroy(zp);
318 switch (step.extended) {
319 .check_file,
320 .compile,
321 .config_header,
322 .fail,
323 .find_program,
324 .fmt,
325 .install_artifact,
326 .install_dir,
327 .install_file,
328 .obj_copy,
329 .options,
330 .top_level,
331 .translate_c,
332 .update_source_files,
333 .write_file,
334 => {},
335 .run => |*extended| extended.deinit(gpa),
336 }
318 step.* = undefined;337 step.* = undefined;
319}338}
320339
lib/compiler/Maker/Step/Run.zig+4
...@@ -372,6 +372,10 @@ pub fn make(...@@ -372,6 +372,10 @@ pub fn make(
372 step.clearFailedCommand(gpa);372 step.clearFailedCommand(gpa);
373}373}
374374
375pub fn deinit(run: *Run, gpa: Allocator) void {
376 run.fuzz_tests.deinit(gpa);
377}
378
375fn thirdPartyToggle(379fn thirdPartyToggle(
376 man_hash: ?*Cache.HashHelper,380 man_hash: ?*Cache.HashHelper,
377 argv_list: *std.ArrayList([]const u8),381 argv_list: *std.ArrayList([]const u8),