Fix exception handling issue (#633)
authorJan Vorlicek <janvorli@microsoft.com>
Tue, 7 Apr 2015 22:27:21 +0000 (00:27 +0200)
committerJan Vorlicek <janvorli@microsoft.com>
Tue, 7 Apr 2015 22:27:21 +0000 (00:27 +0200)
commit65f2393c54428b5b5f540805df6d7ae8b4e8d77a
tree1075c95e2ef8ef79f3e3a992483d012bd62093e2
parent838807429a0828a839958e3b7d392d65886c8f2e
Fix exception handling issue (#633)

This change fixes exception handling issue #633. The problem was caused by the
fact that in interleaved exception handling (when exception propagates over
one or more native / managed stack frame boundaries), we were preserving the
m_ScannedStackRange and m_sfResumeStackFrame members of the exception tracker
after unwinding a sequence of native frames and moving on into next block of
managed ones. The m_ScannedStackRange in that case contained addresses of
frames that were already unwound and in case of a rethrown exception, there
could have been new frames in that range. That lead to improper detection
of already processed frames in some cases.
The proper solution is to start with an empty scanned stack range after the
partial unwind that unwinds managed and the adjacent native frames.
src/vm/exceptionhandling.cpp
src/vm/exceptionhandling.h