Fixes #35269
Fixes #35269
std.zon: fix memory leak #35433
chadwain/zig:zon-leak into master Fixes #35269
can you add a reduction as a test? std.testing.allocator has a leak checker
7dd79ff977
7686fd20f6
added a test case
@ -1109,1 +1109,3 @@
constnote:Error.TypeCheckFailure.Note=if(info.fields.len==0)b:{
constnote:?Error.TypeCheckFailure.Note=if(self.diag==null)
null
elseif(info.fields.len==0)b:{
I see that a lot of these failX functions avoid early returns but in this case it seems worth it to just do
fnfailUnexpected(self:@This(),T:type,item_kind:[]constu8,node:Zoir.Node.Index,field:?usize,name:[]constu8,)error{OutOfMemory,ParseZon}{@branchHint(.cold);if(self.diag==null)returnerror.ParseZon;// ...since all the work done in this function is wasteful when diag is null.
I've implemented your suggestion instead
7686fd20f6
e840ad4d5d
Thanks!
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?