Skip to content

Conversation

elinor-fung
Copy link
Member

@elinor-fung elinor-fung commented Jul 1, 2025

Original change: #117037

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

@Copilot Copilot AI review requested due to automatic review settings July 1, 2025 23:59
Copy link
Contributor

@Copilot Copilot AI left a comment

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),

Copy link
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-fung force-pushed the fix-cordbassembly-id branch from 6856cf5 to 89a04fa Compare July 2, 2025 00:17
@elinor-fung elinor-fung changed the title Fix CordbAssembly ID Reapply "Replace CordbProcess::GetSharedDomain with GetAppDomain" Jul 2, 2025
@elinor-fung elinor-fung requested a review from a team July 2, 2025 00:19
@hoyosjs
Copy link
Member

hoyosjs commented Jul 2, 2025

I'll run some tests before merging

@elinor-fung
Copy link
Member Author

System.Collections.Tests libraries test failure is #111922

@elinor-fung
Copy link
Member Author

elinor-fung commented Jul 3, 2025

/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:main Jul 3, 2025
105 of 115 checks passed
@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-actions github-actions bot locked and limited conversation to collaborators Aug 3, 2025
Sign up for free to 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.

2 participants