From 3b0454dadf12705f81e8c0e35b975b7fb5b7ba0f Mon Sep 17 00:00:00 2001 From: popcoder565 <339285150+popcoder565@users.noreply.github.com> Date: Fri, 9 Oct 2026 10:59:12 -0400 Subject: [PATCH] test(agc-driver): retire the unit shadow block's import before releasing it Co-Authored-By: Claude Opus 5.5 --- core/libs/prx/libSceAgcDriver/tests/Recorder.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/core/libs/prx/libSceAgcDriver/tests/Recorder.cpp b/core/libs/prx/libSceAgcDriver/tests/Recorder.cpp index a8c50a234..d1ef7cf87 100644 --- a/core/libs/prx/libSceAgcDriver/tests/Recorder.cpp +++ b/core/libs/prx/libSceAgcDriver/tests/Recorder.cpp @@ -1370,14 +1370,19 @@ void unitShadowTests(const Device& device, Recorder& recorder) { mutation.Add(block, bytes, true, true); } struct Unregister { + const Context& context; void* block; + std::uint64_t address; bool armed = true; ~Unregister() { if (!armed) return; - GuestAllocations::Mutation mutation; - mutation.Remove(block); + { + GuestAllocations::Mutation mutation; + mutation.Remove(block); + } + HostImportFor(context, address, bytes); } - } unregister{block}; + } unregister{context, block, address}; const auto* import = HostImportFor(context, address, bytes); if (import == nullptr) { std::cout << "host import of the shadow test block refused: unit shadows not tested\n";