From 5959506bbda5f12ec69910cf6121d313f7664b9a Mon Sep 17 00:00:00 2001 From: Yassine Date: Sat, 10 Oct 2026 14:55:41 +0000 Subject: [PATCH] test(avplayer): link guest_avplayer with the shared runtime libraries guest_avplayer_tests imports __cxa_throw from libc.prx, which is loaded before libstdc++, but -static-libgcc gave it a private copy of _Unwind_Resume. A failed Check threw through libc.prx's unwinder and the landing pad of the test function resumed with the private one, so on Linux every failure aborted in _Unwind_RaiseException_Phase2 instead of printing its message from main. This is the unexplained Linux abort in the intermittent guest_avplayer failures. The test is now linked without the static runtime flags, as the AgcDriver, Agc and VideoOut tests already are, so the unwinder comes from the same library as __cxa_throw. A forced Check failure in TestPlayback aborted before and now prints its message and exits with 1. (cherry picked from commit fa5199cd8fef7f9c7ab9e83a441e15d16364a81d) --- core/libs/prx/libSceAvPlayer/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/libs/prx/libSceAvPlayer/CMakeLists.txt b/core/libs/prx/libSceAvPlayer/CMakeLists.txt index e2e599427..bdc296e7e 100644 --- a/core/libs/prx/libSceAvPlayer/CMakeLists.txt +++ b/core/libs/prx/libSceAvPlayer/CMakeLists.txt @@ -2,6 +2,9 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/AvPlayerLibrary.cmake) add_sce_avplayer_library(libSceAvPlayer) if(BUILD_TESTING) + foreach(runtimeLinkFlag IN ITEMS -static-libgcc -static-libstdc++ -static) + string(REPLACE "${runtimeLinkFlag}" "" CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}") + endforeach() add_test_executable(guest_avplayer_tests ${LIBS_INCLUDE_DIR}/tests/GuestAvPlayer.cpp) target_include_directories(guest_avplayer_tests PRIVATE ${LIBS_INCLUDE_DIR}) target_link_libraries(guest_avplayer_tests PRIVATE libSceAvPlayer libc)