fix(agc): catch shutdown in shader ABI resolution #3528
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3528"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-11T12:31:18Z.
What
The shader ABI helpers in
core/libs/prx/libSceAgcDriver/Execution/src/Driver/EntryPoints.cpp:126-140callDriver::ResolveShaderAbi,ResolveGraphicsAbiandResolveGraphicsStagesAbi. Those paths callCheckFailure(), which throwsProcessShutdownwhen window-close shutdown begins, but these C ABI entrypoints do not catch it. Unlike submit, wait-idle, shader-registration and suspend entrypoints, the exception can escape into the guest caller and terminate the process.Catch
ProcessShutdownat all three entrypoints and route the caller throughLibcAwaitExit_nid_postfix(). The new child-process regression requests exit, calls shader ABI resolution with a null shader (the shutdown check runs before argument validation), and verifies the process exits cleanly. On currentmain, that test aborts on the unhandled exception. The report in #3506 does not identify its exact escaping title callsite, so this change covers the confirmed shader-resolution path without claiming to reproduce the title-specific stack.Related to #3506.
Tested
Ubuntu 24.04, GCC 13.3.0, glibc 2.39:
agc_driver_resolution_shutdownaborts on currentmainwith an unhandledProcessShutdown, and passes with this change.agc_driver_wait_shutdownandagc_driver_resolution_shutdownpass together (2/2).git diff --checkandpython3 tools/check_conventions.py --base upstream/mainpass.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T21:06:06Z.
Checked on Linux:
agc_driver_resolution_shutdownfails without theEntryPoints.cppchange and passes with it; the other shutdown tests still pass. Merging.