zon2nix
zon2nix copied to clipboard
Dependency pointers become invalid after HashMap growth
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