[NTOS][NTDLL][UCRTBASE] Use new setjmp/longjmp

This fixes 2 todo tests
This commit is contained in:
Timo Kreuzer
2025-07-02 22:21:17 +03:00
parent 011ce7088c
commit 6d321562c9
11 changed files with 14 additions and 16 deletions

View File

@@ -65,7 +65,7 @@ set_module_type(ntdll win32dll ENTRYPOINT 0)
set_subsystem(ntdll console) set_subsystem(ntdll console)
################# END HACK ################# ################# END HACK #################
target_link_libraries(ntdll ntdll_vista_static etwtrace csrlib rtl rtl_um rtl_vista ntdllsys libcntpr uuid ${PSEH_LIB}) target_link_libraries(ntdll ntdll_vista_static etwtrace csrlib rtl rtl_um rtl_vista ntdllsys libcntpr setjmp uuid ${PSEH_LIB})
if(DLL_EXPORT_VERSION GREATER_EQUAL 0x600) if(DLL_EXPORT_VERSION GREATER_EQUAL 0x600)
target_link_libraries(ntdll cryptlib) target_link_libraries(ntdll cryptlib)
endif() endif()

View File

@@ -19,7 +19,7 @@ list(APPEND SOURCE
add_library(crtdll MODULE ${SOURCE}) add_library(crtdll MODULE ${SOURCE})
set_module_type(crtdll win32dll ENTRYPOINT DllMain 12) set_module_type(crtdll win32dll ENTRYPOINT DllMain 12)
target_link_libraries(crtdll crt wine ${PSEH_LIB}) target_link_libraries(crtdll crt vcruntime wine ${PSEH_LIB})
add_importlibs(crtdll kernel32 ntdll) add_importlibs(crtdll kernel32 ntdll)
add_cd_file(TARGET crtdll DESTINATION reactos/system32 FOR all) add_cd_file(TARGET crtdll DESTINATION reactos/system32 FOR all)

View File

@@ -33,7 +33,7 @@ list(APPEND SOURCE
add_library(msvcrt MODULE ${SOURCE}) add_library(msvcrt MODULE ${SOURCE})
set_module_type(msvcrt win32dll ENTRYPOINT DllMain 12) set_module_type(msvcrt win32dll ENTRYPOINT DllMain 12)
add_dependencies(msvcrt psdk) add_dependencies(msvcrt psdk)
target_link_libraries(msvcrt crt cpprt wine ${PSEH_LIB}) target_link_libraries(msvcrt crt vcruntime cpprt wine ${PSEH_LIB})
if(MSVC) if(MSVC)
# export of deleting destructor "name" # export of deleting destructor "name"

View File

@@ -125,9 +125,9 @@
@ cdecl __fpecode() @ cdecl __fpecode()
@ cdecl __initialize_lconv_for_unsigned_char() @ cdecl __initialize_lconv_for_unsigned_char()
@ cdecl -stub __intrinsic_abnormal_termination() # CHECKME @ cdecl -stub __intrinsic_abnormal_termination() # CHECKME
@ cdecl -stub -norelay __intrinsic_setjmp(ptr) # _setjmp @ cdecl -norelay __intrinsic_setjmp(ptr)
@ cdecl -impsym _setjmp(long ptr) __intrinsic_setjmp @ cdecl -impsym _setjmp(long ptr) __intrinsic_setjmp
@ cdecl -stub -arch=!i386 -norelay __intrinsic_setjmpex(ptr ptr) # _setjmpex @ cdecl -arch=!i386 -norelay __intrinsic_setjmpex(ptr ptr)
@ cdecl __isascii(long) @ cdecl __isascii(long)
@ cdecl __iscsym(long) @ cdecl __iscsym(long)
@ cdecl __iscsymf(long) @ cdecl __iscsymf(long)
@@ -2560,7 +2560,7 @@
@ cdecl set_terminate(ptr) @ cdecl set_terminate(ptr)
@ cdecl set_unexpected(ptr) @ cdecl set_unexpected(ptr)
@ cdecl setbuf(ptr ptr) @ cdecl setbuf(ptr ptr)
@ cdecl -arch=arm,x86_64 -norelay -private setjmp(ptr ptr) _setjmp @ cdecl -arch=arm,x86_64 -norelay -private setjmp(ptr ptr) __intrinsic_setjmp
@ cdecl setlocale(long str) @ cdecl setlocale(long str)
@ cdecl setvbuf(ptr str long long) @ cdecl setvbuf(ptr str long long)
@ cdecl signal(long long) @ cdecl signal(long long)

View File

@@ -23,9 +23,9 @@ function(add_hal _halname)
${CMAKE_CURRENT_BINARY_DIR}/hal.def) ${CMAKE_CURRENT_BINARY_DIR}/hal.def)
if(${_halname} STREQUAL "hal") if(${_halname} STREQUAL "hal")
target_link_libraries(${_halname} libcntpr arbiter fast486 ${PSEH_LIB}) target_link_libraries(${_halname} libcntpr setjmp arbiter fast486 ${PSEH_LIB})
else() else()
target_link_libraries(${_halname} libcntpr fast486 ${PSEH_LIB}) target_link_libraries(${_halname} libcntpr setjmp fast486 ${PSEH_LIB})
endif() endif()
add_importlibs(${_halname} ntoskrnl) add_importlibs(${_halname} ntoskrnl)

View File

@@ -2966,10 +2966,10 @@ void Test_collided_unwind(void)
_SEH2_END; _SEH2_END;
} }
todo_ros ok(Flags == (1 | 2 | 8), "Flags = %x\n", Flags); ok(Flags == (1 | 2 | 8), "Flags = %x\n", Flags);
todo_ros ok(Count == 2, "Count = %d\n", Count); ok(Count == 2, "Count = %d\n", Count);
#ifdef _M_IX86 #ifdef _M_IX86
todo_ros ok(__readfsdword(0) == Registration, "SEH registration corrupted!\n"); ok(__readfsdword(0) == Registration, "SEH registration corrupted!\n");
*(unsigned int*)NtCurrentTeb() = Registration; *(unsigned int*)NtCurrentTeb() = Registration;
#endif #endif

View File

@@ -46,7 +46,7 @@ set_module_type(ntoskrnl kernel)
source_group(TREE ${REACTOS_SOURCE_DIR}/ntoskrnl PREFIX "Source Files" FILES ${NTOSKRNL_SOURCE}) source_group(TREE ${REACTOS_SOURCE_DIR}/ntoskrnl PREFIX "Source Files" FILES ${NTOSKRNL_SOURCE})
target_link_libraries(ntoskrnl cportlib csq ${PSEH_LIB} arbiter cmlib ntlsalib rtl ${ROSSYM_LIB} libcntpr wdmguid poguid ioevent) target_link_libraries(ntoskrnl cportlib csq ${PSEH_LIB} arbiter cmlib ntlsalib rtl ${ROSSYM_LIB} libcntpr setjmp wdmguid poguid ioevent)
if(STACK_PROTECTOR) if(STACK_PROTECTOR)
target_sources(ntoskrnl PRIVATE $<TARGET_OBJECTS:gcc_ssp_nt>) target_sources(ntoskrnl PRIVATE $<TARGET_OBJECTS:gcc_ssp_nt>)

View File

@@ -37,7 +37,7 @@ if(STACK_PROTECTOR)
target_sources(ntkrnlmp PRIVATE $<TARGET_OBJECTS:gcc_ssp_nt>) target_sources(ntkrnlmp PRIVATE $<TARGET_OBJECTS:gcc_ssp_nt>)
endif() endif()
target_link_libraries(ntkrnlmp cportlib csq ${PSEH_LIB} arbiter cmlib ntlsalib rtl ${ROSSYM_LIB} libcntpr wdmguid poguid ioevent) target_link_libraries(ntkrnlmp cportlib csq ${PSEH_LIB} arbiter cmlib ntlsalib rtl ${ROSSYM_LIB} libcntpr setjmp wdmguid poguid ioevent)
add_importlibs(ntkrnlmp hal kdcom bootvid) add_importlibs(ntkrnlmp hal kdcom bootvid)
add_pch(ntkrnlmp ${REACTOS_SOURCE_DIR}/ntoskrnl/include/ntoskrnl.h "${NTKRNLMP_PCH_SKIP_SOURCE}") add_pch(ntkrnlmp ${REACTOS_SOURCE_DIR}/ntoskrnl/include/ntoskrnl.h "${NTKRNLMP_PCH_SKIP_SOURCE}")
add_dependencies(ntkrnlmp psdk asm) add_dependencies(ntkrnlmp psdk asm)

View File

@@ -15,7 +15,6 @@ include(misc/misc.cmake)
include(printf/printf.cmake) include(printf/printf.cmake)
include(process/process.cmake) include(process/process.cmake)
include(search/search.cmake) include(search/search.cmake)
include(setjmp/setjmp.cmake)
include(startup/startup.cmake) include(startup/startup.cmake)
include(stdio/stdio.cmake) include(stdio/stdio.cmake)
include(stdlib/stdlib.cmake) include(stdlib/stdlib.cmake)

View File

@@ -9,7 +9,6 @@ list(APPEND UCRTSUPP_SOURCE
) )
list(APPEND UCRTSUPP_ASM_SOURCE list(APPEND UCRTSUPP_ASM_SOURCE
${CRT_SETJMP_ASM_SOURCE}
${CRT_WINE_ASM_SOURCE} ${CRT_WINE_ASM_SOURCE}
) )

View File

@@ -18,7 +18,7 @@ add_library(ftfd MODULE
${CMAKE_CURRENT_BINARY_DIR}/ftfd.def) ${CMAKE_CURRENT_BINARY_DIR}/ftfd.def)
set_module_type(ftfd kerneldll ENTRYPOINT FtfdEnableDriver 12) set_module_type(ftfd kerneldll ENTRYPOINT FtfdEnableDriver 12)
target_link_libraries(ftfd freetype libcntpr ${PSEH_LIB}) target_link_libraries(ftfd freetype libcntpr setjmp ${PSEH_LIB})
add_pch(ftfd ftfd.h "${PCH_SKIP_SOURCE}") add_pch(ftfd ftfd.h "${PCH_SKIP_SOURCE}")
add_importlibs(ftfd win32k) add_importlibs(ftfd win32k)
add_dependencies(ftfd psdk) add_dependencies(ftfd psdk)