This uses `gc_cleanup` to call the exception_ptr destructor when the `Failed` is collected. I don't know exactly how bad it is to deallocate `std::exception_ptr` without destruction, but I guess it ranges from small leak to UB and crash.
dir
extern "C"
globals.hh
nix_store_realise