Collapse VM contracts to STANDARD_VM_CONTRACT where equivalent - #132637
Collapse VM contracts to STANDARD_VM_CONTRACT where equivalent#132637AaronRobinsonMSFT wants to merge 7 commits into
Conversation
Keep metadata-capture and static-field-address helpers mode-agnostic since they are reachable from both cooperative and preemptive callers. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 52084f96-2cf7-43bf-8c38-3b9ac3baab4f
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
Tagging subscribers to this area: @agocke |
Co-authored-by: Aaron R Robinson <arobins@microsoft.com>
|
Looks like we have a problem with sprintf in CONTRACT_ASSERT macro: |
Yes, that has been this way for a while. There are certain code paths that if they assert during a contract will cause a failure. The issue is a stale link in the contract stack frame. I am going to start on that soon. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 52084f96-2cf7-43bf-8c38-3b9ac3baab4f
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| @@ -1970,12 +1960,7 @@ HRESULT Debugger::StartupPhase2(Thread * pThread) | |||
|
|
|||
| void Debugger::InitializeLazyDataIfNecessary() | |||
There was a problem hiding this comment.
Dead code - delete? It does not seem to be called anywhere.
| GC_TRIGGERS; | ||
| } | ||
| CONTRACTL_END; | ||
| STANDARD_VM_CONTRACT; |
There was a problem hiding this comment.
I am not sure about this and other changed under debugger, and in eedbginterfaceimpl.cpp. Debugger often wants to do stuff in no-GC trigger mode. Have you been able to validate this with debugger tests on checked build of the runtime?
|
@jkotas @jkoritzinsky I pushed up a bunch of random changes I made on the branch. I need to audit them still. Please ignore this PR for now. |
Collapse expanded CONTRACTL blocks to STANDARD_VM_CONTRACT / STANDARD_VM_CHECK in the VM where semantically equivalent.
Helpers reachable from both cooperative and preemptive callers (metadata capture, static-field-address) are kept mode-agnostic to avoid adding an incorrect MODE_PREEMPTIVE check.
Validated with a Checked x64 build and the full System.Reflection test suite (1794 passed, 0 failed).
Note
This PR description was generated with assistance from GitHub Copilot.