| ... | @@ -3849,7 +3849,11 @@ fn setMiscFailure( | ... | @@ -3849,7 +3849,11 @@ fn setMiscFailure( |
| 3849 | ) Allocator.Error!void { | 3849 | ) Allocator.Error!void { |
| 3850 | try comp.misc_failures.ensureUnusedCapacity(comp.gpa, 1); | 3850 | try comp.misc_failures.ensureUnusedCapacity(comp.gpa, 1); |
| 3851 | const msg = try std.fmt.allocPrint(comp.gpa, format, args); | 3851 | const msg = try std.fmt.allocPrint(comp.gpa, format, args); |
| 3852 | comp.misc_failures.putAssumeCapacityNoClobber(tag, .{ .msg = msg }); | 3852 | const gop = comp.misc_failures.getOrPutAssumeCapacity(tag); |
| | 3853 | if (gop.found_existing) { |
| | 3854 | gop.value_ptr.deinit(comp.gpa); |
| | 3855 | } |
| | 3856 | gop.value_ptr.* = .{ .msg = msg }; |
| 3853 | } | 3857 | } |
| 3854 | | 3858 | |
| 3855 | pub fn dump_argv(argv: []const []const u8) void { | 3859 | pub fn dump_argv(argv: []const []const u8) void { |