Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
8db57e9
cDAC: stress framework improvements and stack walk bug fixes
Apr 13, 2026
c51d212
Address PR review feedback
Apr 13, 2026
090a110
Address additional PR feedback (batch 2)
Apr 13, 2026
81eaf17
Address PR feedback (batch 3)
Apr 13, 2026
b91fea7
Address PR feedback (batch 4)
Apr 13, 2026
776df02
Update stale x86 comments in CheckForSkippedFrames
Apr 13, 2026
8a34406
Update contract docs and address remaining PR feedback
Apr 13, 2026
5f914cc
Fix ReadPointerField type assertions for embedded types
Apr 13, 2026
af1c8b3
Document instruction-level GC stress results in known-issues.md
Apr 13, 2026
478dce9
Add FindReadyToRunModule fallback and refactor IsInterrupted tracking
Apr 14, 2026
4883828
Update known-issues with latest stress test analysis
Apr 14, 2026
1bbcdfc
Document ELEMENT_TYPE_INTERNAL root cause for 3 FRAME_DAC_ONLY failures
Apr 14, 2026
1936364
Add register info to FRAME_DIFF output and handle BadImageFormatExcep…
Apr 14, 2026
5a1953a
Add SP comparison to FRAME_DIFF output for unwinder verification
Apr 14, 2026
fc1f66a
Fix IsFirst not preserved for skipped frames causing scratch register…
Apr 15, 2026
4fbfd1f
Update known-issues: IsFirst fix resolved all 4 FRAME_DIFF failures
Apr 15, 2026
5f416b0
Address code review findings
Apr 15, 2026
a9107f2
Add cDAC stress tests to CI via Helix
Apr 15, 2026
5c63541
Add RuntimeSignatureDecoder with ELEMENT_TYPE_INTERNAL support
Apr 17, 2026
956efe8
Port ArgIterator from crossgen2 for calling convention analysis
Apr 21, 2026
9db0819
Address PR review feedback
Apr 21, 2026
de5cb46
Address remaining PR review comments
Apr 22, 2026
55229af
Fix Apple x64 ABI detection and thread MetadataReader through decoder
Apr 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/design/datacontracts/GCInfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ IGCInfoHandle DecodeInterpreterGCInfo(TargetPointer gcInfoAddress, uint gcVersio

// Fetches length of code as reported in GCInfo
uint GetCodeLength(IGCInfoHandle handle);

// Returns the list of interruptible code offset ranges from the GCInfo
IReadOnlyList<InterruptibleRange> GetInterruptibleRanges(IGCInfoHandle handle);
```

## Version 1
Expand Down
8 changes: 8 additions & 0 deletions docs/design/datacontracts/RuntimeTypeSystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,14 @@ partial interface IRuntimeTypeSystem : IContract
// Return true if a MethodDesc represents an IL stub with a special MethodDesc context arg
public virtual bool HasMDContextArg(MethodDescHandle);

// Return true if the method requires a hidden instantiation argument (generic context parameter).
// Corresponds to native MethodDesc::RequiresInstArg().
public virtual bool RequiresInstArg(MethodDescHandle methodDesc);

// Return true if the method uses the async calling convention.
// Corresponds to native MethodDesc::IsAsyncMethod().
public virtual bool IsAsyncMethod(MethodDescHandle methodDesc);

// Return true if a MethodDesc is in a collectible module
public virtual bool IsCollectibleMethod(MethodDescHandle methodDesc);

Expand Down
14 changes: 14 additions & 0 deletions docs/design/datacontracts/StackWalk.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,21 @@ This contract depends on the following descriptors:
| `StubDispatchFrame` | `MethodDescPtr` | Pointer to Frame's method desc |
| `StubDispatchFrame` | `RepresentativeMTPtr` | Pointer to Frame's method table pointer |
| `StubDispatchFrame` | `RepresentativeSlot` | Frame's method table slot |
| `StubDispatchFrame` | `GCRefMap` | Cached pointer to GC reference map blob for caller stack promotion |
| `StubDispatchFrame` | `ZapModule` | Module pointer for lazy GCRefMap resolution via import sections |
| `StubDispatchFrame` | `Indirection` | Import slot pointer for lazy GCRefMap resolution |
| `ExternalMethodFrame` | `GCRefMap` | Cached pointer to GC reference map blob for caller stack promotion |
Comment thread
max-charlamb marked this conversation as resolved.
| `ExternalMethodFrame` | `Indirection` | Import slot pointer for lazy GCRefMap resolution |
| `ExternalMethodFrame` | `ZapModule` | Module pointer for lazy GCRefMap resolution via import sections |
| `DynamicHelperFrame` | `DynamicHelperFrameFlags` | Flags indicating which argument registers contain GC references |
| `TransitionBlock` | `ReturnAddress` | Return address associated with the TransitionBlock |
| `TransitionBlock` | `CalleeSavedRegisters` | Platform specific CalleeSavedRegisters struct associated with the TransitionBlock |
| `TransitionBlock` (arm) | `ArgumentRegisters` | ARM specific `ArgumentRegisters` struct |
| `TransitionBlock` | `OffsetOfArgs` | Byte offset of stack arguments (first arg after registers) = `sizeof(TransitionBlock)` |
| `TransitionBlock` | `ArgumentRegistersOffset` | Byte offset of the ArgumentRegisters within the TransitionBlock |
| `TransitionBlock` | `FirstGCRefMapSlot` | Byte offset where GCRefMap slot enumeration begins. ARM64: RetBuffArgReg offset; others: ArgumentRegisters offset |
| `ReadyToRunInfo` | `ImportSections` | Pointer to array of `READYTORUN_IMPORT_SECTION` structs for GCRefMap resolution |
| `ReadyToRunInfo` | `NumImportSections` | Count of import sections in the array |
| `FuncEvalFrame` | `DebuggerEvalPtr` | Pointer to the Frame's DebuggerEval object |
| `DebuggerEval` | `TargetContext` | Context saved inside DebuggerEval |
| `DebuggerEval` | `EvalDuringException` | Flag used in processing FuncEvalFrame |
Expand All @@ -85,6 +97,8 @@ This contract depends on the following descriptors:
| `ExceptionInfo` | `CallerOfActualHandlerFrame` | Stack frame of the caller of the catch handler |
| `ExceptionInfo` | `PreviousNestedInfo` | Pointer to previous nested ExInfo |
| `ExceptionInfo` | `PassNumber` | Exception handling pass (1 or 2) |
| `ExceptionInfo` | `ClauseForCatchHandlerStartPC` | Start PC offset of the catch handler clause, used for interruptible offset override |
| `ExceptionInfo` | `ClauseForCatchHandlerEndPC` | End PC offset of the catch handler clause, used for interruptible offset override |

Global variables used:
| Global Name | Type | Purpose |
Expand Down
5 changes: 5 additions & 0 deletions eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@
<SubsetName Include="Tools.ILLinkTests" OnDemand="true" Description="Unit tests for the tools.illink subset." />
<SubsetName Include="Tools.CdacTests" OnDemand="true" Description="Unit tests for the diagnostic data contract reader." />
<SubsetName Include="Tools.CdacDumpTests" OnDemand="true" Description="Dump-based integration tests for the diagnostic data contract reader." />
<SubsetName Include="Tools.CdacStressTests" OnDemand="true" Description="Stress integration tests for the diagnostic data contract reader." />
<SubsetName Include="Tools.ILAsm" OnDemand="true" Description="Build only the managed ilasm tool." />

<!-- Host -->
Expand Down Expand Up @@ -534,6 +535,10 @@
<ProjectToBuild Include="$(SharedNativeRoot)managed\cdac\tests\DumpTests\Microsoft.Diagnostics.DataContractReader.DumpTests.csproj" Test="true" Category="tools"/>
</ItemGroup>

<ItemGroup Condition="$(_subset.Contains('+tools.cdacstresstests+'))">
<ProjectToBuild Include="$(SharedNativeRoot)managed\cdac\tests\StressTests\Microsoft.Diagnostics.DataContractReader.StressTests.csproj" Test="true" Category="tools"/>
</ItemGroup>

<ItemGroup Condition="$(_subset.Contains('+tools.illink+'))">
<ProjectToBuild Include="$(ToolsProjectRoot)illink\src\linker\Mono.Linker.csproj" Category="tools" />
<ProjectToBuild Include="$(ToolsProjectRoot)illink\src\ILLink.Tasks\ILLink.Tasks.csproj" Category="tools" />
Expand Down
45 changes: 45 additions & 0 deletions eng/pipelines/cdac/prepare-cdac-stress-helix-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# prepare-cdac-stress-helix-steps.yml - Steps for preparing cDAC stress test Helix payloads.
#
# Used by CdacDumpTests stage in runtime-diagnostics.yml.
# Handles: building stress test debuggees, preparing Helix payload, finding testhost.

steps:
- script: $(Build.SourcesDirectory)$(dir).dotnet$(dir)dotnet$(exeExt) msbuild
$(Build.SourcesDirectory)/src/native/managed/cdac/tests/StressTests/Microsoft.Diagnostics.DataContractReader.StressTests.csproj
/t:BuildDebuggeesOnly
/p:Configuration=$(_BuildConfig)
/p:TargetArchitecture=$(archType)
-bl:$(Build.SourcesDirectory)/artifacts/log/BuildStressDebuggees.binlog
displayName: 'Build Stress Debuggees'

- script: $(Build.SourcesDirectory)$(dir).dotnet$(dir)dotnet$(exeExt) build
$(Build.SourcesDirectory)/src/native/managed/cdac/tests/StressTests/Microsoft.Diagnostics.DataContractReader.StressTests.csproj
/p:PrepareHelixPayload=true
/p:Configuration=$(_BuildConfig)
/p:HelixPayloadDir=$(Build.SourcesDirectory)/artifacts/helixPayload/cdac-stress
-bl:$(Build.SourcesDirectory)/artifacts/log/StressTestPayload.binlog
displayName: 'Prepare Stress Test Helix Payload'

- pwsh: |
$testhostDir = Get-ChildItem -Directory -Path "$(Build.SourcesDirectory)/artifacts/bin/testhost/net*-$(osGroup)-*-$(archType)" | Select-Object -First 1 -ExpandProperty FullName
if (-not $testhostDir) {
Write-Error "No testhost directory found"
exit 1
}
Write-Host "TestHost root: $testhostDir"
Write-Host "##vso[task.setvariable variable=StressTestHostRootDir]$testhostDir"

$queue = switch ("$(osGroup)_$(archType)") {
"windows_x64" { "$(helix_windows_x64)" }
"windows_x86" { "$(helix_windows_x64)" }
"windows_arm64" { "$(helix_windows_arm64)" }
"linux_x64" { "$(helix_linux_x64_oldest)" }
"linux_arm64" { "$(helix_linux_arm64_oldest)" }
"linux_arm" { "$(helix_linux_arm32_oldest)" }
"osx_x64" { "$(helix_macos_x64)" }
"osx_arm64" { "$(helix_macos_arm64)" }
default { Write-Error "Unsupported platform: $(osGroup)_$(archType)"; exit 1 }
}
Write-Host "Helix queue: $queue"
Write-Host "##vso[task.setvariable variable=CdacStressHelixQueue]$queue"
displayName: 'Find Stress TestHost and Helix Queue'
12 changes: 11 additions & 1 deletion eng/pipelines/runtime-diagnostics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ extends:
shouldContinueOnError: true
jobParameters:
nameSuffix: CdacDumpTest
buildArgs: -s clr+libs+tools.cdac+tools.cdacdumptests -c $(_BuildConfig) -rc checked -lc $(_BuildConfig) /p:SkipDumpVersions=net10.0
buildArgs: -s clr+libs+tools.cdac+tools.cdacdumptests+tools.cdacstresstests -c $(_BuildConfig) -rc checked -lc $(_BuildConfig) /p:SkipDumpVersions=net10.0
timeoutInMinutes: 180
postBuildSteps:
- template: /eng/pipelines/cdac/prepare-cdac-helix-steps.yml
Expand All @@ -286,6 +286,16 @@ extends:
displayName: 'Publish Dump Artifacts'
condition: and(always(), ne(variables['Agent.JobStatus'], 'Succeeded'))
continueOnError: true
# cDAC Stress Tests — run GC stress verification on the same Checked build
- template: /eng/pipelines/cdac/prepare-cdac-stress-helix-steps.yml
- template: /eng/pipelines/common/templates/runtimes/send-to-helix-inner-step.yml
parameters:
displayName: 'Send cDAC Stress Tests to Helix'
sendParams: $(Build.SourcesDirectory)/src/native/managed/cdac/tests/StressTests/cdac-stress-helix.proj /t:Test /p:TargetOS=$(osGroup) /p:TargetArchitecture=$(archType) /p:HelixTargetQueues="$(CdacStressHelixQueue)" /p:TestHostPayload=$(StressTestHostRootDir) /p:StressTestsPayload=$(Build.SourcesDirectory)/artifacts/helixPayload/cdac-stress /bl:$(Build.SourcesDirectory)/artifacts/log/SendStressToHelix.binlog
environment:
_Creator: dotnet-bot
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
NUGET_PACKAGES: $(Build.SourcesDirectory)$(dir).packages
- pwsh: |
if ("$(Agent.JobStatus)" -ne "Succeeded") {
Write-Error "One or more cDAC dump test failures were detected. Failing the job."
Expand Down
Loading
Loading