aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/eval.hh
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2021-08-29 18:55:38 +0200
committerRobert Hensing <robert@roberthensing.nl>2021-08-29 20:42:49 +0200
commit8bc76acc7c3665897a1b7e14574b379664f058d2 (patch)
treed3fa81027bf5c5678a6c56a584b86b3d3a86958e /src/libexpr/eval.hh
parentaf94b54db3a2be100731a215cb5e95f306471731 (diff)
Move vCallFlake into EvalState
This fixes a use-after-free bug: 1. s = new EvalState(); 2. callFlake() 3. static vCallFlake now references s 4. delete s; 5. s2 = new EvalState(); 6. callFlake() 7. static vCallFlake still references s 8. crash Nix 2.3 did not have a problem with recreating EvalState.
Diffstat (limited to 'src/libexpr/eval.hh')
-rw-r--r--src/libexpr/eval.hh1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh
index 6f3474854..22b0a584b 100644
--- a/src/libexpr/eval.hh
+++ b/src/libexpr/eval.hh
@@ -100,6 +100,7 @@ public:
/* Store used to build stuff. */
const ref<Store> buildStore;
+ RootValue vCallFlake = nullptr;
private:
SrcToStore srcToStore;