Skip to content

Conversation

davidwrighton
Copy link
Member

  • Notably for creation of delegates to SVM methods which do not require generic dictionary lookups
  • Also a drive by fix of the vtable handling for NativeImageLayout which was causing crashes of the DAC when used in debug builds

Fixes #109200

- Notably for creation of delegates to SVM methods which do not require generic dictionary lookups
- Also a drive by fix of the vtable handling for NativeImageLayout which was causing crashes of the DAC when used in debug builds

Fixes dotnet#109200
@Copilot Copilot AI review requested due to automatic review settings August 6, 2025 22:12
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 fixes static virtual method (SVM) delegate creation that was causing crashes when creating delegates to SVM methods that don't require generic dictionary lookups. It also includes a drive-by fix for vtable handling in NativeImageLayout that was causing DAC crashes in debug builds.

Key changes:

  • Adds type handle setting for static methods during method decoding
  • Fixes vtable declaration for NativeImageLayout to work properly with DAC
  • Removes test exclusions that were previously failing due to the fixed issue

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/tests/issues.targets Removes exclusions for StaticVirtualMethods tests that are now fixed
src/coreclr/vm/zapsig.cpp Adds type handle assignment for static methods in DecodeMethod
src/coreclr/vm/peimagelayout.h Fixes DACCESS_COMPILE conditional placement for NativeImageLayout
src/coreclr/inc/vptr_list.h Adds missing VPTR_CLASS entry for NativeImageLayout

Copy link
Contributor

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

@davidwrighton
Copy link
Member Author

/azp run runtime-coreclr crossgen2-composite

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dotnet dotnet deleted a comment from azure-pipelines bot Aug 6, 2025
@davidwrighton davidwrighton requested a review from kg August 6, 2025 22:14
@davidwrighton davidwrighton merged commit ac85d6f into dotnet:main Aug 7, 2025
115 of 117 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 7, 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.

Crossgen outerloop regression: Failures in GenericContextTest / GenericContextTestDefaultImp
2 participants