-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[interp] Make InterpreterStub handle being called on threads without a Thread object #119906
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
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 fixes the InterpreterStub to handle being called on threads that don't have a managed Thread object. This is necessary for fixing the Interop\GCBridge\BridgeTest.
- Adds null check and thread setup logic in Thread::GetInterpThreadContext()
- Modifies InterpreterStub assembly to handle null thread pointers
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/coreclr/vm/threads.cpp | Adds null thread handling logic to GetInterpThreadContext() method |
| src/coreclr/vm/amd64/AsmHelpers.asm | Adds null check for thread pointer in InterpreterStub assembly code |
|
Tagging subscribers to this area: @BrzVlad, @janvorli, @kg |
|
If we decide this is an OK fix I'll update the other versions of InterpreterStub. |
Update helpers for other targets
|
Just noticed I forgot to add a contract, this new helper function should be LIMITED_METHOD_CONTRACT right? |
Add contract
…a Thread object (dotnet#119906) Make InterpreterStub handle being called on threads without a Thread object Fixes Interop\GCBridge\BridgeTest --------- Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Fixes Interop\GCBridge\BridgeTest, sort of (it also has an intermittent gc hole I think is fixed by #119867)