zon2nix icon indicating copy to clipboard operation
zon2nix copied to clipboard

Dependency pointers become invalid after HashMap growth

Open knightpp opened this issue 5 months ago • 0 comments

I believe when hash map grows pointers become invalid.

Function fetch accepts the hashmap but later map mutation occurs, invalidating pointers. https://github.com/nix-community/zon2nix/blob/2360e358c2107860dadd340f88b25d260b538188/src/fetch.zig#L28

parse puts to map and is called inside for loop that accesses workers and in turn workers contain a pointer to Dependency. See https://github.com/nix-community/zon2nix/blob/2360e358c2107860dadd340f88b25d260b538188/src/fetch.zig#L119

knightpp avatar Jul 28 '25 05:07 knightpp