# HG changeset patch # User dcubed # Date 1265134097 25200 # Node ID f19bf22685cc849b1064a0eba4b16df21a133369 # Parent 6deeaebad47a1f0cf5dbe480b96364c5815e7c13# Parent 0fc941df6fb74a77ba573be10138a5881623fd64 Merge diff -r 6deeaebad47a -r f19bf22685cc src/os/windows/vm/os_windows.cpp --- a/src/os/windows/vm/os_windows.cpp Mon Feb 01 17:35:05 2010 -0700 +++ b/src/os/windows/vm/os_windows.cpp Tue Feb 02 11:08:17 2010 -0700 @@ -1,5 +1,5 @@ /* - * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2010 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -142,6 +142,9 @@ } #ifndef _WIN64 +// previous UnhandledExceptionFilter, if there is one +static LPTOP_LEVEL_EXCEPTION_FILTER prev_uef_handler = NULL; + LONG WINAPI Handle_FLT_Exception(struct _EXCEPTION_POINTERS* exceptionInfo); #endif void os::init_system_properties_values() { @@ -260,7 +263,8 @@ } #ifndef _WIN64 - SetUnhandledExceptionFilter(Handle_FLT_Exception); + // set our UnhandledExceptionFilter and save any previous one + prev_uef_handler = SetUnhandledExceptionFilter(Handle_FLT_Exception); #endif // Done @@ -1969,7 +1973,7 @@ #ifndef _WIN64 //----------------------------------------------------------------------------- LONG WINAPI Handle_FLT_Exception(struct _EXCEPTION_POINTERS* exceptionInfo) { - // handle exception caused by native mothod modifying control word + // handle exception caused by native method modifying control word PCONTEXT ctx = exceptionInfo->ContextRecord; DWORD exception_code = exceptionInfo->ExceptionRecord->ExceptionCode; @@ -1990,6 +1994,13 @@ return EXCEPTION_CONTINUE_EXECUTION; } } + + if (prev_uef_handler != NULL) { + // We didn't handle this exception so pass it to the previous + // UnhandledExceptionFilter. + return (prev_uef_handler)(exceptionInfo); + } + return EXCEPTION_CONTINUE_SEARCH; } #else //_WIN64