about summary refs log tree commit diff
path: root/src/libexpr/get-drvs.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-11-25T13·47+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-11-25T13·47+0000
commit812fae424ee7139cf9bc0d17815ee68aa3cab517 (patch)
tree23c5d8ca5ac432769da1f5a89dcba2fede0e2039 /src/libexpr/get-drvs.hh
parent4aced7f8d0d5d2c1057b0f46a70a37a577f81fa5 (diff)
* DrvInfo contains pointers to expressions, so DrvInfos should be
  traced by the garbage collector.  Otherwise "nix-env -u" can crash
  randomly.

Diffstat (limited to 'src/libexpr/get-drvs.hh')
-rw-r--r--src/libexpr/get-drvs.hh4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libexpr/get-drvs.hh b/src/libexpr/get-drvs.hh
index 7c014b7e41f2..2d260c57beee 100644
--- a/src/libexpr/get-drvs.hh
+++ b/src/libexpr/get-drvs.hh
@@ -62,7 +62,11 @@ public:
 };
 
 
+#if HAVE_BOEHMGC
+typedef list<DrvInfo, traceable_allocator<DrvInfo> > DrvInfos;
+#else
 typedef list<DrvInfo> DrvInfos;
+#endif
 
 
 /* If value `v' denotes a derivation, store information about the