0
0
Fork 0
forked from lix-project/lix

Fix aborts when using builtins.getFlake

In that case, 'self' could refer to a value on the stack, so accessing
'self.rev' would abort.
This commit is contained in:
Eelco Dolstra 2019-10-02 22:08:19 +02:00
parent 780c1a8f27
commit 90d6018509
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -574,8 +574,9 @@ static void prim_callFlake(EvalState & state, const Pos & pos, Value * * args, V
void callFlake(EvalState & state,
const Flake & flake,
const LockedInputs & lockedInputs,
Value & vRes)
Value & vResFinal)
{
auto & vRes = *state.allocValue();
auto & vInputs = *state.allocValue();
state.mkAttrs(vInputs, flake.inputs.size() + 1);
@ -617,6 +618,8 @@ void callFlake(EvalState & state,
state.callFunction(vCall, *flake.vOutputs, vCall2, noPos);
state.callFunction(vCall2, vInputs, vCall3, noPos);
state.callFunction(vCall3, vSourceInfo, vRes, noPos);
vResFinal = vRes;
}
void callFlake(EvalState & state,