-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Turn Debugger.Log, Debugger.Launch, and Delegate.BindToMethodName to QCalls #48211
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
Conversation
Tagging subscribers to this area: @tommcdon Issue Details
Some changes to add the BEGIN_QCALL/END_QCALL macros.
Uses same helper as Debugger.Log
|
I haven't ported the other call (ValidateObject), but wanted to get a feel if this is what we need to do. Will open the 3.1 PR after this. I am currently testing this locally. |
It may be useful to make this change in master first, and then port it to servicing. |
239d98a
to
feab66b
Compare
src/coreclr/src/vm/comdelegate.cpp
Outdated
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.
You still have to protect the GC references like before. Number of the calls below triggers GC - it is not ok to have unprotected GC reference in a local while calling GC triggering method.
The easiest way to do this is to keep the gc struct and use GCPROTECT_BEGIN/END
macro to protect it.
It may be possible to avoid GCPROTECT_BEGIN/END
and instead re-fetch the value each time from ObjectHandleOnStack. It would be more involved change.
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.
I think this shows that we should do the change in dotnet/runtime first so that subtle GC holes (if there are any) will show up as intermittent crashes in CI. The servicing CI runs much less often and so these bugs would take a lot longer to surface.
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.
I will do this on master first, I just can't turn this into draft, so I continued working here first.
feab66b
to
f647808
Compare
@jkotas yeah. I am closing this one. |
Some changes to add the BEGIN_QCALL/END_QCALL macros.
Uses same helper as Debugger.Log, so convert too.