about summary refs log tree commit diff
path: root/third_party/nix/src/libexpr/value.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-04-16T15·24+0200
committertazjin <mail@tazj.in>2020-07-17T20·04+0000
commit014436eb4ad0c403647939a2461e1fe4a7967c89 (patch)
tree387ed387466f0813961096e24a3eddc03d8a2f25 /third_party/nix/src/libexpr/value.hh
parent5218c83b9ff24e15941382e1d065f87d562ba3ac (diff)
fix(3p/nix): ValueMap, VectorVector: Use traceable_allocator r/1353
We want to *trace* the 'Value *' arrays, not garbage-collect them!
Otherwise the vectors/maps can end up pointing to nowhere.

Backported from:
https://github.com/NixOS/nix/commit/10e17eaa5802a3c368eee8408821828072e76ba7

Change-Id: I30dc94caa80c9d982e7a14bc67ba2d065e8203aa
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1252
Tested-by: BuildkiteCI
Reviewed-by: isomer <isomer@tvl.fyi>
Diffstat (limited to 'third_party/nix/src/libexpr/value.hh')
-rw-r--r--third_party/nix/src/libexpr/value.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/third_party/nix/src/libexpr/value.hh b/third_party/nix/src/libexpr/value.hh
index 01b9fd3a216d..7308dd31933a 100644
--- a/third_party/nix/src/libexpr/value.hh
+++ b/third_party/nix/src/libexpr/value.hh
@@ -242,9 +242,9 @@ void mkPath(Value& v, const char* s);
    not included. */
 size_t valueSize(Value& v);
 
-typedef std::vector<Value*, gc_allocator<Value*> > ValueVector;
+typedef std::vector<Value*, traceable_allocator<Value*>> ValueVector;
 typedef std::map<Symbol, Value*, std::less<Symbol>,
-                 gc_allocator<std::pair<const Symbol, Value*> > >
+                 traceable_allocator<std::pair<const Symbol, Value*>>>
     ValueMap;
 
 }  // namespace nix