Repository navigation
Conversation
|
Azure Pipelines: Successfully started running 3 pipeline(s). 12 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: copilot-swe-agent[bot] <[email protected]>
Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/7258e58c-6777-484a-b00e-9bf40fd6b061 Co-authored-by: copilot-swe-agent[bot] <[email protected]>
|
@copilot Try again. This is not a security fix |
Resumed and validated the correctness fix in |
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
There was a problem hiding this comment.
🔵 Needs a closer look
The shared unsafe GC-layout change needs maintainer confirmation because reported Crossgen2 GCStress testing does not establish NativeAOT runtime coverage for recursive nested/reference/byref replication.
No open issues 🎉
What changed in this PR
Fixes incomplete GC layouts for inline arrays overlapped by reference fields, addressing #137842 in the shared JIT interface used by crossgen2 and NativeAOT.
Changes:
- Processes each inline-array element independently of whether earlier slots were already marked.
- Replaces layout copying with per-element GC marking to account for overlapping fields.
- Adds a regression test checking that overlapping inline-array references survive a forced compacting GC.
| File | Description |
|---|---|
| src/tests/Loader/classloader/InlineArray/InlineArrayValid.cs | Adds GC-survival coverage for an inline array overlapped by an object field. |
| src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs | Ensures GC layout generation marks all inline-array elements despite existing overlapping slots. |
Review effort: Balanced
|
Doesn't the same bug exist in jitinterface.cpp? runtime/src/coreclr/vm/jitinterface.cpp Lines 2319 to 2336 in 1ad0b8d I would expect us to see the test failing because of that, but maybe the test can just luck out even if we don't report the elements? |
|
/azp run runtime-coreclr gcstress-extra |
|
Let's see whether the test is any good |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
@copilot Double check that the test is failing without the fix and passes with the fix (with GCStress on). It does not appear to be the case |
Verified on Linux x64 Debug with A separate xUnit-console run passed with both images because its second assembly load disabled ReadyToRun; that run does not validate the fix. No source changes were needed. |
|
@copilot The same issue exists with JIT - see #137932 (comment) . Can you modify the test so that it crashes with JIT? (Do not fix the bug in the JIT just yet.) |
|
@copilot Try again - this is reliability bug, not a sensitive security issue |
In
GatherClassGCLayout,MarkGcFieldreturns 0 when a slot is already marked with the same GC type. Becauseomarks slot 0 first, walkingArrgivesresult == 0, and the replication loop for elements 1..N-1 is skipped. Replication should depend on the element's GC layout (e.g.ContainsGCPointers), not on the number of newly marked slots.Fixes #137842