diff --git a/lib/compiler/Maker/Fuzz.zig b/lib/compiler/Maker/Fuzz.zig index 12e4087fa1bcd3b8c8c5d4262a8c27a6683d7dd9..25da25516ceb5d8ba5b68f393041276340530990 100644 --- a/lib/compiler/Maker/Fuzz.zig +++ b/lib/compiler/Maker/Fuzz.zig @@ -161,6 +161,7 @@ pub fn deinit(fuzz: *Fuzz) void { fuzz.group.cancel(io); fuzz.prog_node.end(); gpa.free(fuzz.run_steps); + fuzz.msg_queue.deinit(gpa); } fn rebuildTestsWorkerRun( diff --git a/lib/compiler/Maker/Step/Run.zig b/lib/compiler/Maker/Step/Run.zig index 5b0e70a1413e0ed321c9ae41f8a6792a91811e92..7f5afff5cbb1968bb25537a716a715a9efb20506 100644 --- a/lib/compiler/Maker/Step/Run.zig +++ b/lib/compiler/Maker/Step/Run.zig @@ -18,14 +18,13 @@ const Step = @import("../Step.zig"); const Maker = @import("../../Maker.zig"); const Fuzz = @import("../../Maker/Fuzz.zig"); -/// If this is a Zig unit test binary, this tracks the names of the unit -/// tests that are also fuzz tests. Indexes cannot be used as they may -/// change between reruns. +/// If this is a Zig unit test binary, this tracks the names of the unit tests that are also fuzz tests. +/// Indexes cannot be used as they may change between reruns. Memory owned by `Maker.gpa`. fuzz_tests: std.ArrayList([]const u8) = .empty, cached_test_metadata: ?CachedTestMetadata = null, -/// Populated during the fuzz phase if this run step corresponds to a unit test -/// executable that contains fuzz tests. +/// Populated during the fuzz phase if this run step corresponds to a unit test executable that contains fuzz +/// tests. `Path.sub_path` owned by `Maker.gpa`. rebuilt_executable: ?Path = null, pub fn make( @@ -376,6 +375,7 @@ pub fn make( pub fn deinit(run: *Run, gpa: Allocator, io: Io) void { _ = io; run.fuzz_tests.deinit(gpa); + if (run.rebuilt_executable) |p| gpa.free(p.sub_path); } fn thirdPartyToggle(