Repository navigation
test(agc): catch the descriptor pool reset terminate on macOS - #13126
Conversation
agc_descriptor_pool_reset_failure makes vkResetDescriptorPool return VK_ERROR_DEVICE_LOST and expects DescriptorCache::Free to end in std::terminate, caught by a handler set through the guest _ZSt13set_terminatePFvvE_nid_postfix. On Linux libc routes the driver's std::terminate to that guest handler; on macOS it reaches the host libc++abi handler instead, so the test aborted. On macOS the test now also installs the same exit handler with std::set_terminate around the Free call and restores it afterwards. The driver is unchanged.
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Windows run of this head (
AI-assisted: yes (Claude Code). |
✅ NVIDIA GPU test: passedPR head
Intermittent validation messages (1, seen once in the parallel run, not reproduced when the test was re-run alone 2 times; not counted against this PR)Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)Validation IDs already present on main (3 IDs in 109 tests)Skipped (8)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
|
Checked the diff (test-only, 8 lines under |
What
Next part of splitting #8658:
agc_descriptor_pool_reset_failureaborts on macOS. The test makes the mockvkResetDescriptorPoolreturnVK_ERROR_DEVICE_LOST, expectsDescriptorCache::Freeto end instd::terminate, and catches that with an exit handler set through the guest_ZSt13set_terminatePFvvE_nid_postfix. On Linux, libc routes the driver'sstd::terminateto that guest handler, so the test exits cleanly. On macOS that routing does not happen: the driver'sstd::terminatereaches the host libc++abi handler, which aborts.On macOS the test now also installs the same exit handler with
std::set_terminatearound theFreecall, and restores the previous one afterwards. Only the test changes, by 8 added lines in#ifdef __APPLE__; the driver is unchanged. Linux and Windows compile the same test as before.I compared the added lines with all 1,453 open PRs. None carries this change; the only shared lines are
});and#endif, from #11551, #8874 and #5925.Tested
Apple M2 Pro, macOS 26.6.2, x86_64 Release under Rosetta 2. Same base and the same build, with only
tests/Graphics.cppchanged. The test function is identical tomainat08a10d225.tests/Graphics.cppagc_descriptor_pool_reset_failuremain7e659e7ea)agc_descriptor_cache, from the same test binary, passes 3/3 with this change.The base is my local macOS test base:
mainatb27cc8416plus the open macOS build PRs and local patches listed in #11303.Outside the
__APPLE__blocks, the file's text equalsmainfor bothunifdef -U__APPLE__ -D__linux__and-D_WIN32.python3 tools/check_conventions.py --base origin/mainpasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)