[PATCH] ucrtbase: Implement _seh_filter_exe and _seh_filter_dll
Martin Storsjo
martin at martin.st
Wed Nov 4 04:19:25 CST 2015
These are implemented in the exact same way as _XcptFilter (with
the same comment copypasted).
This gives more sensible crash behaviour e.g. if an unimplemented
function is called.
Signed-off-by: Martin Storsjo <martin at martin.st>
---
.../api-ms-win-crt-runtime-l1-1-0.spec | 4 ++--
dlls/msvcrt/except.c | 20 ++++++++++++++++++++
dlls/ucrtbase/ucrtbase.spec | 4 ++--
3 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/dlls/api-ms-win-crt-runtime-l1-1-0/api-ms-win-crt-runtime-l1-1-0.spec b/dlls/api-ms-win-crt-runtime-l1-1-0/api-ms-win-crt-runtime-l1-1-0.spec
index d52b81b..4c4dc26 100644
--- a/dlls/api-ms-win-crt-runtime-l1-1-0/api-ms-win-crt-runtime-l1-1-0.spec
+++ b/dlls/api-ms-win-crt-runtime-l1-1-0/api-ms-win-crt-runtime-l1-1-0.spec
@@ -63,8 +63,8 @@
@ stub _register_onexit_function
@ stub _register_thread_local_exe_atexit_callback
@ cdecl _resetstkoflw() ucrtbase._resetstkoflw
-@ stub _seh_filter_dll
-@ stub _seh_filter_exe
+@ cdecl _seh_filter_dll(long ptr) ucrtbase._seh_filter_dll
+@ cdecl _seh_filter_exe(long ptr) ucrtbase._seh_filter_exe
@ cdecl _set_abort_behavior(long long) ucrtbase._set_abort_behavior
@ cdecl _set_app_type(long) ucrtbase._set_app_type
@ cdecl _set_controlfp(long long) ucrtbase._set_controlfp
diff --git a/dlls/msvcrt/except.c b/dlls/msvcrt/except.c
index f5c8b03..666c5a5 100644
--- a/dlls/msvcrt/except.c
+++ b/dlls/msvcrt/except.c
@@ -276,6 +276,26 @@ int CDECL _XcptFilter(NTSTATUS ex, PEXCEPTION_POINTERS ptr)
}
/*********************************************************************
+ * _seh_filter_dll (MSVCRT.@)
+ */
+int CDECL _seh_filter_dll(unsigned long ex, PEXCEPTION_POINTERS ptr)
+{
+ TRACE("(%08x,%p)\n", ex, ptr);
+ /* I assume ptr->ExceptionRecord->ExceptionCode is the same as ex */
+ return msvcrt_exception_filter(ptr);
+}
+
+/*********************************************************************
+ * _seh_filter_exe (MSVCRT.@)
+ */
+int CDECL _seh_filter_exe(unsigned long ex, PEXCEPTION_POINTERS ptr)
+{
+ TRACE("(%08x,%p)\n", ex, ptr);
+ /* I assume ptr->ExceptionRecord->ExceptionCode is the same as ex */
+ return msvcrt_exception_filter(ptr);
+}
+
+/*********************************************************************
* _abnormal_termination (MSVCRT.@)
*/
int CDECL _abnormal_termination(void)
diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec
index 6877bef..61f3413 100644
--- a/dlls/ucrtbase/ucrtbase.spec
+++ b/dlls/ucrtbase/ucrtbase.spec
@@ -1874,8 +1874,8 @@
@ cdecl -arch=arm,x86_64 _scalbf(float long) MSVCRT__scalbf
@ cdecl _searchenv(str str ptr) MSVCRT__searchenv
@ cdecl _searchenv_s(str str ptr long) MSVCRT__searchenv_s
-@ stub _seh_filter_dll
-@ stub _seh_filter_exe
+@ cdecl _seh_filter_dll(long ptr)
+@ cdecl _seh_filter_exe(long ptr)
@ stub _set_FMA3_enable
@ stdcall -arch=i386 _seh_longjmp_unwind4(ptr)
@ stdcall -arch=i386 _seh_longjmp_unwind(ptr)
--
1.8.1.2
More information about the wine-patches
mailing list