-
Notifications
You must be signed in to change notification settings - Fork 5k
backport 111408 #114932
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
base: release/9.0-staging
Are you sure you want to change the base?
backport 111408 #114932
Conversation
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.
Pull Request Overview
This PR backports changes to support special user mode APC handling in thread suspension and debugging paths.
- Introduces new thread state flags (TS_SSToExitApcCall and TS_SSToExitApcCallDone) and helper methods to manage APC-related thread suspension.
- Adds an overload for HandleSuspensionForInterruptedThread and updates debugger and controller logic to handle single-stepping out of APC calls.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
src/coreclr/vm/threadsuspend.cpp | Added APC handling in thread suspension, new method MarkForSuspensionAndWait, and overload for HandleSuspensionForInterruptedThread. |
src/coreclr/vm/threads.h | Updated thread state flags, friend declarations, and protected member methods. |
src/coreclr/vm/dbginterface.h, debugger.h, debugger.cpp | Introduced SingleStepToExitApcCall support for APC callbacks during debugging. |
src/coreclr/debug/ee/controller.cpp | Modified exception dispatch to manage APC exit using the new thread state flags. |
Comments suppressed due to low confidence (1)
src/coreclr/vm/threadsuspend.cpp:4241
- Ensure that the new FEATURE_SPECIAL_USER_MODE_APC code paths, including the APC exit handling, are adequately covered by regression tests to verify both normal and debugger-assisted scenarios.
#ifdef FEATURE_SPECIAL_USER_MODE_APC
return FALSE; | ||
} | ||
pCurThread->SetThreadState(Thread::TS_SSToExitApcCallDone); | ||
pCurThread->ResetThreadState(Thread::TS_SSToExitApcCall); |
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.
Verify that the ordering of state flag updates in the APC exit block is consistent with expected behavior and that resetting TS_SSToExitApcCall occurs only after setting TS_SSToExitApcCallDone.
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
Tagging subscribers to this area: @mangod9 |
No description provided.