Fix exception tracker popping in a corner case
authorJan Vorlicek <janvorli@microsoft.com>
Tue, 5 Jan 2016 10:09:53 +0000 (11:09 +0100)
committerJan Vorlicek <janvorli@microsoft.com>
Tue, 5 Jan 2016 13:33:10 +0000 (14:33 +0100)
commita09046a6409f61e40958404bcc82abf81e12b73e
tree57df64a19497464cda91fba513379a3fa8bab59a
parentd9ffbea7f1d364f160b886c570d80428157c77b7
Fix exception tracker popping in a corner case

This change fixes exception tracker popping in case a managed exception is handled in
the CoreCLR native code. The current exception tracker has an empty scanned stack
range in that case and the existing code in the ExceptionTracker::PopTrackers was
skipping the popping in such case, considering it a case when an exception happened
while the exception tracker was being setup.
Adding check that the tracker is in the first pass to that condition fixes the problem,
since when the tracker is in the second pass, it cannot be the case in which the PopTrackers
wanted to skip the popping.
The tracker is then popped correctly in the code below.

I have also reverted a fix for the exception from filter which was conflicting with this
fix and this fix fixes the problem of the exception from filter too.
src/vm/exceptionhandling.cpp