Fix handling of NullReferenceException in VSD on ARM (dotnet/coreclr#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)
commitf44a47bfc12a101a7456f86f21d5de1019acb751
treef76ae6a639cd51cb89c2c5199833da9cd351f2fb
parent08583013fefdf0bc35d19b5310fc031d9bcc22d7
Fix handling of NullReferenceException in VSD on ARM (dotnet/coreclr#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.

Commit migrated from https://github.com/dotnet/coreclr/commit/9c9fd0cc3623efdface3af63beb829339a5da3f1
src/coreclr/src/vm/arm/exceparm.cpp
src/coreclr/src/vm/excep.cpp
src/coreclr/src/vm/excep.h
src/coreclr/src/vm/exceptionhandling.cpp
src/coreclr/src/vm/i386/excepx86.cpp
src/coreclr/src/vm/stackwalk.cpp