Skip to content

Commit

Permalink
queue runner: fix nullptr deref on build exception after releasing a …
Browse files Browse the repository at this point in the history
…machine reservation
  • Loading branch information
delroth authored and mweinelt committed Feb 16, 2025
1 parent c60e795 commit c3b6e7b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/hydra-queue-runner/builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ void State::builder(MachineReservation::ptr reservation)

try {
auto destStore = getDestStore();
// Might release the reservation.
res = doBuildStep(destStore, reservation, activeStep);
} catch (std::exception & e) {
printMsg(lvlError, "uncaught exception building ‘%s’ on ‘%s’: %s",
localStore->printStorePath(reservation->step->drvPath),
reservation->machine->sshName,
localStore->printStorePath(activeStep->step->drvPath),
reservation ? reservation->machine->sshName : std::string("(no machine)"),
e.what());
}
}
Expand Down

0 comments on commit c3b6e7b

Please sign in to comment.