1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 03:21:16 +02:00

C API: Require initialized value from primop definition

This commit is contained in:
Robert Hensing 2024-05-23 18:31:20 +02:00
parent a942a34469
commit 8884227045
2 changed files with 37 additions and 0 deletions

View file

@ -94,6 +94,12 @@ static void nix_c_primop_wrapper(
state.error<nix::EvalError>("Error from builtin function: %s", *ctx.last_err).atPos(pos).debugThrow();
}
if (!vTmp.isValid()) {
state.error<nix::EvalError>("Implementation error in custom function: return value was not initialized")
.atPos(pos)
.debugThrow();
}
v = vTmp;
}