-
Notifications
You must be signed in to change notification settings - Fork 5.5k
[cDAC] ArgIterator stress validation: enable byte-identical GCRefMap blobs across x64/x86 and wire ARGITER sub-check into Helix #129769
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
Merged
max-charlamb
merged 40 commits into
dotnet:main
from
max-charlamb:cdac-shared-argiterator
Jun 27, 2026
+4,058
−469
Merged
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
4ed3a59
Move ArgIterator and TransitionBlock to tools/Common/CallingConvention
9d63284
Introduce ITypeHandle interface and extract TypeHandle to own file
8500cfd
Move TypeHandle to crossgen2 project directory
63ba9a4
Move shared CallingConvention to Internal.Runtime.CallingConvention n…
6c8d22e
Eliminate TypeSystem deps, add CallingConvention contract with CdacTy…
c5793ba
Add CallingConvention contract with GCDesc-based value type GC ref en…
05b74e8
Refactor ICallingConvention to be GC-agnostic and wire into GcScanner
3f8a754
WIP: dump test for CallingConvention vs GCRefMap + NotImplementedExce…
4871a47
[cdac stress] Phase 1: ArgIterator sub-check + restructure DOTNET_Cda…
162066a
[cdac stress] Phase 2: wire ComputeCallRefMap as the runtime oracle
a790180
[cdac stress] Phase 3-5: ArgIterator encoder, pretty-print FAILs, ByR…
91f60ad
[cdac stress] Phase 5: encode by-value structs containing GC pointers
4629836
[cdac stress] Phase 6: resolve both VAR and MVAR via combined generic…
4626b20
[cdac stress] Phase 7: enable x86 in the GCRefMap encoder
f38f8e8
[cdac stress] Phase 7.1: x86 ARG_FAIL pretty-print + GetCbStackPop ha…
32aeb1e
[cdac stress] Phase 7.2: propagate OutermostKind into CdacTypeHandle …
6a0d298
[cdac stress] Phase 8: implement IsTrivialPointerSizedStruct for x86 …
520b73a
cDAC RuntimeTypeSystem: add IsByRefLike and GetFieldDescApproxTypeHandle
c16f04c
cDAC CallingConvention: support ByRefLike struct args and nested valu…
f395308
cDAC stress: nested-struct scenario + CallSignatures debuggee
edd8f1c
cDAC CallingConvention: normalize value-type args via GetInternalCorE…
af5df05
cDAC CallingConvention: emit VASigCookie token for vararg methods
17c19ec
cDAC stress: add ARGITER theory + machine-readable [GC_STATS] marker
0f28c3a
cDAC stress CI: add windows_x86 to the stress test matrix
b87168a
cDAC stress: tolerate ARG_SKIP and route unsupported archs there
68a29a4
cDAC stress: catch NotImplementedException across the whole encoder
9165ab2
cDAC stress: new CrossModule debuggee covering cross-module type refs
31fabbe
Address PR review feedback from copilot-pull-request-reviewer
03f3db5
cDAC stress: scope ARGITER theories to windows-x86/x64, split out Var…
df2b289
cDAC stress: consolidate VarArgs into WindowsOnlyDebuggees, rename GC…
6b8f881
Address PR review feedback: narrow surface, redesign wire format, fol…
f28f3c3
Address PR review feedback round 3
821fcea
Stress tests: add CrossModule to xunit list; exclude VarArgs from GCREFS
2a79af0
ArgIterator: require objectTypeHandle/intPtrTypeHandle/isWindows
be6aaf3
ArgIterator: make generic over TTypeHandle to avoid boxing
7a20278
CallingConvention_1: fold GetCbStackPop into GetArgumentLayout
1f100d7
Address PR review feedback round 4 (Copilot follow-up)
af7c18f
Final polish: misleading comment, README rename, Helix chmod
807b833
CdacTypeHandle: promote _arch field to public Arch property
e497ec8
cdacstress: fix gcc -Werror=address and -Werror=format-truncation
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # Contract CallingConvention | ||
|
|
||
| This contract walks a method's argument signature using the runtime's | ||
| calling-convention rules so consumers can locate each argument on the | ||
| caller's transition frame and reason about which slots hold GC references. | ||
|
|
||
| The actual ABI (which registers hold which arguments, what alignment and | ||
| padding rules apply, how structs are promoted to registers vs spilled, how | ||
| varargs are passed, etc.) is documented in the CLR ABI specs and is not | ||
| re-described here: | ||
|
|
||
| - [Common CLR ABI conventions](../coreclr/botr/clr-abi.md) | ||
|
|
||
| This contract's responsibility is to surface the *result* of that walk in | ||
| a form the cDAC can use, byte-for-byte compatible with what the runtime | ||
| itself produces. | ||
|
|
||
| ## APIs of contract | ||
|
|
||
| ``` csharp | ||
| // Encode the argument GCRefMap blob for `methodDesc` byte-for-byte | ||
| // compatible with the runtime's ComputeCallRefMap (frames.cpp). | ||
| // Returns false when this contract declines to encode the method | ||
| // (e.g. an unported ABI path); callers should map false to E_NOTIMPL. | ||
| // When false, the value of `blob` is unspecified. | ||
| bool TryComputeArgGCRefMapBlob(MethodDescHandle methodDesc, out byte[] blob); | ||
| ``` | ||
|
|
||
| ## Version 1 | ||
|
|
||
| The single API is implemented by walking the shared `ArgIterator` | ||
| (`src/coreclr/tools/Common/CallingConvention/ArgIterator.cs`) and feeding | ||
| the per-argument result into a GCRefMap encoder that mirrors | ||
| `GCRefMapBuilder` (`src/coreclr/inc/gcrefmap.h`). | ||
|
|
||
| `TryComputeArgGCRefMapBlob` returns `false` for any method whose | ||
| signature, ABI path, or generic context the encoder hasn't been taught | ||
| yet. The cdacstress harness (`src/coreclr/vm/cdacstress.cpp`, | ||
| `ARGITER` sub-check) uses byte-for-byte comparison of the returned blob | ||
| against the runtime's `ComputeCallRefMap` output as its correctness | ||
| oracle. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.