Closed tangdf closed 4 years ago
We hit null reference in VSD_DispatchStub
, but do not convert it into NullReferenceException:
(5330.4adc): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
CLRStub[VSD_DispatchStub]@7ffd0363314a:
00007ffd`0363314a 483901 cmp qword ptr [rcx],rax ds:00000000`00000000=????????????????
cc @janvorli
I am looking into it.
I have found that this bug has been present since .NET Core 1.0. We don't do any check for the failure address being in the dispatch stub in the exception handling code. It works correctly in .NET Framework 4.8 though.
Actually, the issue is even in .NET Framework 4.8. I've accidentally tested x86 version before. The x64 has the same problem as the .NET Core one. It seems that implementing AdjustContextForVirtualStub along the lines of the ARM / x86 version would fix the problem.
In IIS , .net framework 4.5~ 4.8 has the same problem.
Demo ConsoleApp.zip