test(libSceLibcInternal): let the spawn test's child die from SIGBUS in an ASan build #11239
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/11239"
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-25T22:27:44Z.
What
guest_posix_spawn(added in #9133) checks thatwaitpidreports a child killed by a signal. For that, the spawned child raisesSIGBUSitself (child-kill-bus,GuestPosixSpawn.cpp:340). In anANYPS5_ENABLE_ASANbuild the child is instrumented too, and AddressSanitizer handlesSIGBUSby default (handle_sigbus=1). It reportsAddressSanitizer: BUS on unknown address ... in pthread_killand aborts, so the parent sees a different signal and failsPosix spawn check failed at line 311((status & 0x7f) == guestSignal).add_asan_test_options(guest_posix_spawn handle_sigbus=0)adds the option to the test'sASAN_OPTIONS, as other tests already do fordetect_stack_use_after_returnandverify_asan_link_order. The child inherits the parent's environment, so its deliberateSIGBUSkills it as intended. The option only exists in ASan builds; other builds are unchanged. ASan still reports real faults throughSIGSEGVthere.Tested
On an
ubuntu-latestfork runner:-DANYPS5_ENABLE_ASAN=ONDebug build,ASAN_OPTIONS=detect_leaks=0:guest_posix_spawnpasses with this change. With the CMake file restored frommain, it fails withSUMMARY: AddressSanitizer: BUS ... in pthread_killandPosix spawn check failed at line 311, as in a full ASan and UBSan run of the tree.guest_posix_spawnpasses.python3 tools/check_conventions.py --base upstream/mainandgit diff --check upstream/mainpass, andtools/pr_overlap.py --branchreports no conflicting lines. Windows and macOS were not run; the option applies only to the Linux ASan build.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)