fix(tvix): Use mutable field for assigning proto fields
This was accidentally using the proto arena API to assign the derivation field of a BuildDerivationRequest. We *thought* this was causing a double free, but even with this change that's still happening. That said, this change is probably still a good idea since it's using the proto API as intended. References: b/64 Change-Id: I950a4eafb214e9113639ea54d2dfd4659b7be931 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2104 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
parent
e1067b1497
commit
20e206a3f6
1 changed files with 2 additions and 2 deletions
4
third_party/nix/src/libstore/rpc-store.cc
vendored
4
third_party/nix/src/libstore/rpc-store.cc
vendored
|
@ -381,8 +381,8 @@ BuildResult RpcStore::buildDerivation(const Path& drvPath,
|
|||
ClientContext ctx;
|
||||
proto::BuildDerivationRequest request;
|
||||
request.mutable_drv_path()->set_path(drvPath);
|
||||
auto proto_drv = drv.to_proto();
|
||||
request.set_allocated_derivation(&proto_drv);
|
||||
proto::Derivation proto_drv = drv.to_proto();
|
||||
*request.mutable_derivation() = proto_drv;
|
||||
request.set_build_mode(BuildModeToProto(buildMode));
|
||||
|
||||
// Same note as in ::buildPaths ...
|
||||
|
|
Loading…
Reference in a new issue