Commit 44faea9
committed
fix: heap-paranoia false-positive from free-before-publish ordering
tplAddFunc (template.zig) and mapSet (vm_map.zig) freed the old
managed slice before repointing the object's field to the new one,
so heap-paranoia's live-object scan caught the object still
referencing the bytes being freed. Publish first, then free, matching
the pattern already established in mapInsertHashed/vm.zig/template.zig
elsewhere in this file.1 parent 1eb4e61 commit 44faea9
2 files changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
791 | 791 | | |
792 | 792 | | |
793 | 793 | | |
794 | | - | |
| 794 | + | |
| 795 | + | |
795 | 796 | | |
| 797 | + | |
796 | 798 | | |
797 | 799 | | |
798 | 800 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
172 | 174 | | |
| 175 | + | |
173 | 176 | | |
174 | 177 | | |
175 | 178 | | |
| |||
0 commit comments