Fix hardware exception handling in interleaved handling case
authorJan Vorlicek <janvorli@microsoft.com>
Wed, 8 Apr 2015 10:28:17 +0000 (12:28 +0200)
committerJan Vorlicek <janvorli@microsoft.com>
Wed, 8 Apr 2015 10:28:17 +0000 (12:28 +0200)
commit4922408b6ba53332ed7f8159027640c78bcc2a00
treef89fe7cbabb8d507bfd66052fdeebba5ccc407f2
parent838807429a0828a839958e3b7d392d65886c8f2e
Fix hardware exception handling in interleaved handling case

The issue is that HandleHardwareException doesn't actually throw an exception, but it calls
directly the DispatchManagedException. In case the exception propagation crosses managed to
native boundary, the exception dispatching code uses throw; to unwind the native frames.
But in this particular case, there was no exception thrown and so the rethrow aborts.
The fix is to add try / catch to the HandleHardwareException that throws the PAL_SEHException
that it got as a parameter, catches it right away and then calls the DispatchManagedException
from the catch handler.
src/vm/exceptionhandling.cpp