-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[debugger] Avoid calling debugger_agent_single_step_from_context when thread is not attached yet #58467
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
[debugger] Avoid calling debugger_agent_single_step_from_context when thread is not attached yet #58467
Conversation
|
Tagging subscribers to this area: @thaystg Issue DetailsSpecial thanks to @lambdageek for helping me with this PR.
|
| WrapperInfo *info = mono_marshal_get_wrapper_info (method); | ||
| if (info->subtype == WRAPPER_SUBTYPE_INTERP_IN) { | ||
| /* We could hit a seq point before attaching to the JIT (#8338) */ | ||
| seq_points = FALSE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's the only one
|
/backport to release/6.0-rc1 |
|
Started backporting to release/6.0-rc1: https://github.com/dotnet/runtime/actions/runs/1188329900 |
Blazor android projects (and possibly iOS?) will require this runtime fix: dotnet/runtime#58467 So, enabling interpreter again on non-blazor templates
* Update OutputType to WinExe on -windows This happens in the sdk targets/props but not quite early enough to influence the `EnableWin32Codegen` property which causes `[STAThreadAttribute]` to be generated in the Windows app. * For non-blazor projects, interpreter is fine Blazor android projects (and possibly iOS?) will require this runtime fix: dotnet/runtime#58467 So, enabling interpreter again on non-blazor templates
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1383962
This happens because a WebView embedded in an Android app can call back into the runtime on a native thread that the runtime has not seen before. The callback goes through a wrapper method. The wrapper method is responsible for registering the thread with the runtime. We were incorrectly inserting debugger sequence points in the wrapper method. As a result, if the debugger begins a suspend (which turns on single stepping - which relies on sequence points), the unregistered thread would call back to the debugger which would crash because we have no info about the thread.