-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stepping into multidimensional array of tuples in debug causes internal CLR error #38777
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @tommcdon |
Can also reproduce with 5.0.100-preview.8.20351.5 with VS2019 16.7 P3.1. This happens with "Just My Code" disabled. |
From what I can see, it enters the |
Thanks @Gnbrkm41 I also see this and the Stack for assert
Looks like this line checking if a MD corresponds to an NDirect call is triggering an AV because it was called with a bogus runtime/src/coreclr/src/vm/method.hpp Line 1872 in 312c758
This happened while dispatching the notification for the breakpoint for the step into, and we reach Maybe @jkoritzinsky or @AaronRobinsonMSFT may have some tips for us on why R10 is not what's expected here? I am not very familiar with ABI's here so any pointers are appreciated |
It looks like Also, it looks like the array IL stubs shouldn't be marked as |
I realized I misread the flags. Flags are @noahfalk what's the expected behavior for these stubs? If I add this we step over and there's no AV: index 3477154b664..92e3908dc8e 100644
--- a/src/coreclr/src/vm/stubmgr.cpp
+++ b/src/coreclr/src/vm/stubmgr.cpp
@@ -1793,6 +1793,14 @@ BOOL ILStubManager::TraceManager(Thread *thread,
// so we have nowhere to tell the debugger to move the breakpoint.
return FALSE;
}
+#ifdef FEATURE_ARRAYSTUB_AS_IL
+ else if (pStubMD->GetILStubResolver()->GetStubType() == ILStubResolver::ArrayOpStub)
+ {
+ // These stubs are generated by the JIT. There's no code backing
+ // them, so there's no target to relocate the breakpoint to.
+ return FALSE;
+ }
+#endif
else
{
// This is either direct forward P/Invoke or a CLR-to-COM call, the argument is MD Is there any case where we'd want to let the user step through the native stub (say disassembly mode if they do a step in)? |
Debugger should be treating these stubs as black box ie return It would be better to check for the forward P/Invoke or a CLR-to-COM call stub explicitly before going into "This is either direct forward P/Invoke or a CLR-to-COM call, the argument is MD" path. Once you do that, you can also delete the existing |
Agreed with @jkotas. Not certain if it was clear but I think Jan's suggestion assumes that we add an else { return FALSE } at the end of the chain to avoid the return TRUE that is lurking after it. The logic would look like this:
|
It looks like |
Description
Trying to step into any statement involving getting value from multidimensional array of tuples causes System.ExecutionEngineException and subsequently internal CLR error. However stepping over or checking the value through locals window does not.
Configuration
Code example
The text was updated successfully, but these errors were encountered: