mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-10 01:28:44 +02:00
Merge pull request #1295 from TibixDev/pr/tls-destructor-test
test(libc): resolve the library address in the TLS destructor test
This commit is contained in:
@@ -17,7 +17,7 @@ if(BUILD_TESTING)
|
||||
if(NOT WIN32)
|
||||
add_test_executable(guest_force_tls_destructor_tests ${LIBS_INCLUDE_DIR}/tests/GuestForceTlsDestructor.cpp)
|
||||
target_include_directories(guest_force_tls_destructor_tests PRIVATE ${LIBS_INCLUDE_DIR})
|
||||
target_link_libraries(guest_force_tls_destructor_tests PRIVATE libSceLibcInternal libkernel libc)
|
||||
target_link_libraries(guest_force_tls_destructor_tests PRIVATE libSceLibcInternal libkernel libc ${CMAKE_DL_LIBS})
|
||||
add_test(NAME guest_force_tls_destructor COMMAND guest_force_tls_destructor_tests)
|
||||
set_tests_properties(guest_force_tls_destructor PROPERTIES TIMEOUT 20)
|
||||
endif()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "SceTypes.hpp"
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include <dlfcn.h>
|
||||
#include <stdexcept>
|
||||
#include <vector>
|
||||
|
||||
@@ -68,7 +69,8 @@ bool ForceThrows(KernelModule handle) {
|
||||
|
||||
int main() {
|
||||
self = ModuleOf(&dsoHandle);
|
||||
void* otherDso = reinterpret_cast<void*>(&_sceLibcInternalThreadDtors_nid_postfix);
|
||||
void* otherDso = dlsym(RTLD_NEXT, "_sceLibcInternalThreadDtors_nid_postfix");
|
||||
Require(otherDso != nullptr);
|
||||
const KernelModule other = ModuleOf(otherDso);
|
||||
Require(other != self && other != 0);
|
||||
int local = 0;
|
||||
|
||||
Reference in New Issue
Block a user