Uh oh!
There was an error while loading. Please reload this page.
[cDAC] Implement RequiresAlign8 for cDAC - #126928
Conversation
Add RequiresAlign8 = 0x00800000 to WFLAGS_HIGH in MethodTableFlags_1.cs, add bool RequiresAlign8(TypeHandle) to IRuntimeTypeSystem interface, implement it in RuntimeTypeSystem_1.cs following ContainsGCPointers pattern, replace legacy-delegation stub in DacDbiImpl.cs with full implementation following IsValueType pattern including #if DEBUG legacy validation, and add unit tests covering both flag-set and flag-unset cases. Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/ace0eac0-7c85-43f8-8a5e-71227ee36e84 Co-authored-by: barosiak <76071368+barosiak@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/ace0eac0-7c85-43f8-8a5e-71227ee36e84 Co-authored-by: barosiak <76071368+barosiak@users.noreply.github.com>
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
There was a problem hiding this comment.
Pull request overview
Implements RequiresAlign8 support end-to-end for the cDAC RuntimeTypeSystem contract and exposes it through the legacy DacDbiImpl surface area.
Changes:
- Added a
RequiresAlign8flag/property to theMethodTableFlags_1helper and exposed it viaIRuntimeTypeSystem+RuntimeTypeSystem_1. - Implemented
DacDbiImpl.RequiresAlign8using the cDAC RuntimeTypeSystem contract, with#if DEBUGvalidation against the legacy DAC. - Updated native flag annotations and the RuntimeTypeSystem contract design doc; added tests for flag set/unset across standard architectures.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/native/managed/cdac/tests/MethodTableTests.cs | Adds coverage for IRuntimeTypeSystem.RequiresAlign8 behavior. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/Dbi/DacDbiImpl.cs | Implements RequiresAlign8 via cDAC with DEBUG cross-check against legacy DAC. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/RuntimeTypeSystemHelpers/MethodTableFlags_1.cs | Introduces the RequiresAlign8 flag and accessor on method table flags. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/RuntimeTypeSystem_1.cs | Exposes RequiresAlign8 on the v1 RuntimeTypeSystem contract implementation. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/IRuntimeTypeSystem.cs | Adds the RequiresAlign8 contract API. |
| src/coreclr/vm/methodtable.h | Annotates the native flag as contract-dependent for cDAC. |
| docs/design/datacontracts/RuntimeTypeSystem.md | Documents the new contract API/flag and updates the sample implementation. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…DbiImpl to match runtime semantics Address PR feedback: - Fix parameter naming in RuntimeTypeSystem.md to use consistent camelCase - Remove architecture guard in DacDbiImpl.RequiresAlign8 per reviewer consensus: API should match runtime semantics (true when bit set, false otherwise) Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/d00d40eb-9997-4c3c-ba75-523c076a9c03 Co-authored-by: barosiak <76071368+barosiak@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
🤖 Copilot Code Review — PR #126928Note This review was generated by GitHub Copilot. Holistic AssessmentMotivation: Justified — the cDAC needs to expose the Approach: Correct — the implementation follows the established pattern used by Summary: Detailed Findings
|
Uh oh!
There was an error while loading. Please reload this page.
Summary
Implement RequiresAlign8 on DacDbiImpl in the cDAC.
Changes