Fix handling of NullReferenceException in VSD on ARM (#25627)
authorJan Vorlicek <janvorli@microsoft.com>
Thu, 11 Jul 2019 18:11:12 +0000 (20:11 +0200)
committerGitHub <noreply@github.com>
Thu, 11 Jul 2019 18:11:12 +0000 (20:11 +0200)
commit9c9fd0cc3623efdface3af63beb829339a5da3f1
tree84f2e1e71926a98e6d6f4dacc6836048e8511c2d
parentf9e9c7fe11d0a8f7e33da697ccd5844c5d8d6dfd
Fix handling of NullReferenceException in VSD on ARM (#25627)

* Fix handling of NullReferenceException in VSD on ARM

There was a problem with handling NullReferenceExceptionHandling stemming
from virtual dispatch stub on ARM Linux. While the primary exception was
handled correctly, if the exception was rethrown or another exception
was thrown from the catch handler, it was reported as unhandled even
though there was a proper handler.
The issue was caused by exception unwinding that was unable to unwind past
the frame of the virtual dispatch stub in this case. Such stub is generated
at runtime and there is no unwind info for it.

The fix is to explicitly check for the stub frame and skip it during first
and second pass of exception handling.
src/vm/arm/exceparm.cpp
src/vm/excep.cpp
src/vm/excep.h
src/vm/exceptionhandling.cpp
src/vm/i386/excepx86.cpp
src/vm/stackwalk.cpp