msvcrt: Fix crash when rethrowing after a non-C++ exception on x86_64.

This commit is contained in:
Brendan Shanks 2023-04-20 14:39:42 -07:00 committed by Alexandre Julliard
parent 90cc094260
commit e414561a96

View file

@ -579,14 +579,14 @@ static DWORD cxx_frame_handler(EXCEPTION_RECORD *rec, ULONG64 frame,
return ExceptionContinueSearch;
}
if (rec->ExceptionCode == CXX_EXCEPTION &&
(!rec->ExceptionInformation[1] && !rec->ExceptionInformation[2]))
{
TRACE("rethrow detected.\n");
*rec = *msvcrt_get_thread_data()->exc_record;
}
if (rec->ExceptionCode == CXX_EXCEPTION)
{
if (!rec->ExceptionInformation[1] && !rec->ExceptionInformation[2])
{
TRACE("rethrow detected.\n");
*rec = *msvcrt_get_thread_data()->exc_record;
}
exc_type = (cxx_exception_type *)rec->ExceptionInformation[2];
if (TRACE_ON(seh))