Skip to content

Conversation

kg
Copy link
Member

@kg kg commented Aug 25, 2025

Fixes one of the problems with baseservices\compilerservices\UnsafeAccessors\UnsafeAccessorsTests.

@Copilot Copilot AI review requested due to automatic review settings August 25, 2025 19:44
@kg kg requested review from BrzVlad and janvorli as code owners August 25, 2025 19:45
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 adds support for taking the address of the empty string in the CoreCLR interpreter. This addresses an issue in the UnsafeAccessorsTests where the interpreter needs to handle address-of operations on the empty string literal.

Key changes:

  • Adds a new interpreter operation INTOP_LDPTR_ADDRESS to load pointer addresses
  • Implements execution logic for the new operation in the interpreter
  • Handles the CORINFO_FIELD_INTRINSIC_EMPTY_STRING case in static field address emission

Reviewed Changes

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

File Description
src/coreclr/vm/interpexec.cpp Adds execution case for INTOP_LDPTR_ADDRESS operation
src/coreclr/interpreter/intops.def Defines the new INTOP_LDPTR_ADDRESS operation
src/coreclr/interpreter/compiler.cpp Implements compiler logic for empty string address handling

Copy link
Contributor

Tagging subscribers to this area: @BrzVlad, @janvorli, @kg
See info in area-owners.md if you want to be subscribed.

@jkotas jkotas merged commit f774c8e into dotnet:main Aug 26, 2025
96 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants