Skip to content

Commit

Permalink
Merge pull request #11548 from DeterminateSystems/fix-zipAttrsWith-gc
Browse files Browse the repository at this point in the history
Fix missing GC root in zipAttrsWith
  • Loading branch information
edolstra committed Sep 19, 2024
2 parents 9ea29ea + 4449b0d commit ca3fc16
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libexpr/primops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3136,7 +3136,11 @@ static void prim_zipAttrsWith(EvalState & state, const PosIdx pos, Value * * arg
std::optional<ListBuilder> list;
};

#if HAVE_BOEHMGC
std::map<Symbol, Item, std::less<Symbol>, traceable_allocator<std::pair<const Symbol, Item>>> attrsSeen;
#else
std::map<Symbol, Item> attrsSeen;
#endif

state.forceFunction(*args[0], pos, "while evaluating the first argument passed to builtins.zipAttrsWith");
state.forceList(*args[1], pos, "while evaluating the second argument passed to builtins.zipAttrsWith");
Expand Down

0 comments on commit ca3fc16

Please sign in to comment.