test(libc): cover C++ rethrow, exception_ptr and _Doraise #25087
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/25087"
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 MarrasFederico on 2026-11-21T16:23:15Z.
What
Add guest regression tests covering
libcC++ exception runtime (libSceLibcInternal):50-R08 (
core/libs/tests/GuestLibcRethrow.cpp,guest_libc_rethrow_tests)__cxa_rethrow_nid_postfixinside nestedcatchblocks (identity preservation,__cxa_uncaught_exceptions == 1during unwind, single destruction), plusset_terminateinvocation viasetjmp/longjmpwhen no active exception exists.__cxa_allocate_dependent_exception_nid_postfix/__cxa_free_dependent_exception_nid_postfixzero-initialization andnullptrfree safety.__cxa_current_primary_exception_nid_postfix,__cxa_rethrow_primary_exception_nid_postfix(including explicitnullptrno-op verification without invoking terminate or changing uncaught count), and__cxa_increment_exception_refcount_nid_postfix/__cxa_decrement_exception_refcount_nid_postfixexact destructor trigger on final release.50-R09 (
core/libs/tests/GuestExceptionPointer.cpp,guest_exception_pointer_tests)_ZSt17current_exceptionv_nid_postfixoutside vs insidecatch, survival pastcatchexit,_ZNSt15__exception_ptr13exception_ptrC1EPv_nid_postfix/_M_get/_M_addref/_M_release, and_ZSt17rethrow_exceptionNSt15__exception_ptr13exception_ptrE_nid_postfixrefcount balance and singleAPS5_VABIdestructor execution on final release.50-R15 (
core/libs/tests/GuestLibcDoraiseSystemError.cpp,guest_libc_doraise_system_error_tests)_Doraisehandlers (_ZNKSt9exception8_DoraiseEv,_ZNKSt8bad_cast8_DoraiseEv,_ZNKSt11logic_error8_DoraiseEv,_ZNKSt8ios_base7failure8_DoraiseEv) for null-pointerstd::invalid_argumentrejection and guest exception cloning/dispatch._ZNSt12system_errorC2ERKS__nid_postfixcopy construction preserving error code/category after source destruction.Tested
guest_libc_rethrow_tests,guest_exception_pointer_tests, andguest_libc_doraise_system_error_testsbuilt cleanly andctest -R "^(guest_libc_rethrow|guest_exception_pointer|guest_libc_doraise_system_error)$" --repeat until-fail:3passed 3/3.guest_libc_rethrow_tests,guest_exception_pointer_tests, andguest_libc_doraise_system_error_testsbuilt cleanly andctest -R "^(guest_libc_rethrow|guest_exception_pointer|guest_libc_doraise_system_error)$" --repeat until-fail:3passed 3/3 (9/9 runs).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)Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-21T17:44:32Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
0eedfc4362:tools/check_conventions.pypassed.guest_exception_pointer_tests,guest_libc_doraise_system_error_tests,guest_libc_rethrow_testsbuilt cleanly.guest_libc_rethrow,guest_exception_pointer,guest_libc_doraise_system_error):Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T00:35:21Z.
Review: APPROVED
Reviewed — looks good
The reviewed changes add three guest regression tests, and the inspected diff shows no blocking defect.
What I ran
Reviewed head
0eedfc436252f4c3ee2374ddf1135e0885974970against the prepared diff. No commands or tests were run; Linux and Windows test results are author-reported.Results
Findings
Blocking
None.
Non-blocking
None.
Sources
Reviewed
review/description.md,review/commits.md,review/manifest.json, andreview/diff.patch. The diff includes all changed files:core/libs/prx/libc/CMakeLists.txt,core/libs/tests/GuestExceptionPointer.cpp,core/libs/tests/GuestLibcDoraiseSystemError.cpp, andcore/libs/tests/GuestLibcRethrow.cpp. No files were excluded from the manifest.Not verified
Builds and tests were not run as part of this review. No repository files were excluded from review.
To get this to a good state
Nothing is required.