about summary refs log tree commit diff
path: root/third_party/nix/src/libexpr/eval.hh
diff options
context:
space:
mode:
authorKane York <kanepyork@gmail.com>2020-07-31T22·12-0700
committerkanepyork <rikingcoding@gmail.com>2020-08-01T18·54+0000
commit770034042a3e7cb7f3a9f7a271ab45e44b0d006c (patch)
treec8c57e68e6dcda23bcb494ff6f09dc048e3350f8 /third_party/nix/src/libexpr/eval.hh
parentdc4c0bad65be85c60b2d077eab2e1618d1ee7d5a (diff)
fix(3p/nix): Use a proper pointer in Env to carry with-attrs r/1526
This eliminates the value-smuggling that would trip up the GC.

Change-Id: I8057df78cf0bf6bea9faf1b44233aa9820ae44f5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1504
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
Reviewed-by: tazjin <mail@tazj.in>
Diffstat (limited to '')
-rw-r--r--third_party/nix/src/libexpr/eval.hh1
1 files changed, 1 insertions, 0 deletions
diff --git a/third_party/nix/src/libexpr/eval.hh b/third_party/nix/src/libexpr/eval.hh
index 199253bc45..2c285ed5c1 100644
--- a/third_party/nix/src/libexpr/eval.hh
+++ b/third_party/nix/src/libexpr/eval.hh
@@ -42,6 +42,7 @@ struct Env : public gc {
   unsigned short prevWith : 14;  // nr of levels up to next `with' environment
   enum { Plain = 0, HasWithExpr, HasWithAttrs } type : 2;
   std::vector<Value*, traceable_allocator<Value*>> values;
+  Expr* withAttrsExpr = nullptr;
 };
 
 Value& mkString(Value& v, const std::string& s,