test(libSceLibcInternal): run guest_force_tls_destructor on Windows #3858
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3858"
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 LeandroLP23 on 2026-10-11T18:03:01Z.
What
According to TechnicalDebt,
_sceLibcInternalForceTlsDestructorthrows on Windows when the thread has destructors, "as the lookup is Linux only". The module lookup goes throughsceKernelGetModuleInfoFromAddr, which has had a Windows path since77ef75c1d, so the call works there too. Only the test was still Linux-only (if(NOT WIN32),dlsym(RTLD_NEXT)).guest_force_tls_destructornow builds on Windows too. It gets the other module's address withGetProcAddress(GetModuleHandleA("libSceLibcInternal.prx"), ...)where Linux keepsdlsym(RTLD_NEXT), and it gets the sameconfigure_windows_unwindandPATHsetup asguest_thread_atexit.Tested
maina11c8f7f7:guest_force_tls_destructorpasses 3/3.FindDsoModuleforced to fail (no module found for any dso), the test fails, so it exercises the Windows lookup.guest_thread_atexit,guest_force_tls_destructorand the fiveguest_module_*tests pass 7/7.tools/check_conventions.py --base origin/mainpasses.guest_force_tls_destructorpasses on Windows and Linux.main:guest_filesystem(#3518),guest_kernel_sys(#3510) andwindows_exceptions(#3411) on Windows;agc_driver_emulated_color_compare,agc_driver_image_plane_address_on_line_implicit_lodandguest_kernel_stack_protecton Linux.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 repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T22:10:36Z.
Checked the CMake/test change against the sibling tests in the directory (same
configure_windows_unwind+PATHsetup asguest_thread_atexit), the Windows path ofsceKernelGetModuleInfoFromAddron main, and the TechnicalDebt entry. Linux build andguest_force_tls_destructorpass; the Windows run is the one reported in the PR. Merging.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T22:11:39Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/prx/libSceLibcInternal/CMakeLists.txtL57-63