Skip to content

Reapply "Replace CordbProcess::GetSharedDomain with GetAppDomain" - #117224

Merged
elinor-fung merged 2 commits into
dotnet:mainfrom
elinor-fung:fix-cordbassembly-id
Jul 3, 2025
Merged

Reapply "Replace CordbProcess::GetSharedDomain with GetAppDomain"#117224
elinor-fung merged 2 commits into
dotnet:mainfrom
elinor-fung:fix-cordbassembly-id

Conversation

@elinor-fung

@elinor-fungelinor-fung commented Jul 1, 2025

Copy link
Copy Markdown
Member

Original change: #117037

Fix on top of the original: 1002a9d. Use Assembly as the ID instead of DomainAssembly. See #117221

CopilotAI review requested due to automatic review settings July 1, 2025 23:59
@github-actionsgithub-actionsBot added the area-AssemblyLoader-coreclr only use for closed issues label Jul 1, 2025

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR simplifies the ID cookie passed to the CordbBase constructor in CordbAssembly by always using vmAssembly instead of conditionally choosing between vmAssembly and vmDomainAssembly.

  • Removed the vmDomainAssembly.IsNull() check in the constructor initializer list.
  • Now always calls VmPtrToCookie(vmAssembly) for the assembly ID.
Comments suppressed due to low confidence (2)

src/coreclr/debug/di/rsassembly.cpp:29

  • Add a unit test scenario where the same assembly is loaded into multiple AppDomains to ensure the new ID generation logic produces unique and consistent cookies.
 VMPTR_DomainAssembly vmDomainAssembly)

src/coreclr/debug/di/rsassembly.cpp:32

  • By removing the null check on vmDomainAssembly, we should verify that vmAssembly is always valid here; consider adding an assertion (_ASSERTE(!vmAssembly.IsNull())) or early guard to prevent passing a null pointer to VmPtrToCookie.
 VmPtrToCookie(vmAssembly),

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.

@elinor-fung
elinor-fungforce-pushed the fix-cordbassembly-id branch from 6856cf5 to 89a04faCompareJuly 2, 2025 00:17
@elinor-fungelinor-fung changed the title Fix CordbAssembly IDReapply "Replace CordbProcess::GetSharedDomain with GetAppDomain"Jul 2, 2025
@elinor-fung
elinor-fung requested a review from a teamJuly 2, 2025 00:19
@hoyosjs

Copy link
Copy Markdown
Member

I'll run some tests before merging

@elinor-fung

Copy link
Copy Markdown
MemberAuthor

System.Collections.Tests libraries test failure is #111922

@elinor-fung

elinor-fung commented Jul 3, 2025

Copy link
Copy Markdown
MemberAuthor

/ba-g failure is #111922

I'll run some tests before merging

Chatted offline that we should be good.

@elinor-fung
elinor-fung merged commit c4bc758 into dotnet:mainJul 3, 2025
@elinor-fung
elinor-fung deleted the fix-cordbassembly-id branch July 3, 2025 20:36
MihaZupan pushed a commit to MihaZupan/runtime that referenced this pull request Jul 4, 2025
…tnet#117224)
Fix on top of the original: use Assembly as the ID for CordbAssembly instead of DomainAssembly.
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Aug 3, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@elinor-fung@hoyosjs