Skip to content

Conversation

@kotlarmilos
Copy link
Member

Description

This PR fixes builds for Apple mobile simulators.

@kotlarmilos kotlarmilos requested review from akoeplinger, Copilot and janvorli and removed request for Copilot November 7, 2025 12:27
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Nov 7, 2025
@kotlarmilos kotlarmilos added os-ios Apple iOS area-CodeGen-Interpreter-coreclr and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Nov 7, 2025
@kotlarmilos kotlarmilos added this to the 11.0.0 milestone Nov 7, 2025
@kotlarmilos kotlarmilos changed the title Adjust OFFSETOF__Thread__m_pInterpThreadContext for Apple mobile simulators Adjust OFFSETOF__Thread__m_pInterpThreadContext for Apple mobile simulators Nov 7, 2025
@dotnet-policy-service
Copy link
Contributor

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

Copy link
Member

@janvorli janvorli left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

Copilot AI review requested due to automatic review settings November 13, 2025 13:36
Copilot finished reviewing on behalf of kotlarmilos November 13, 2025 13:40
Copy link
Contributor

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 builds for Apple mobile simulators by adjusting the OFFSETOF__Thread__m_pInterpThreadContext constant to account for different structure sizes between DEBUG and RELEASE builds on Unix platforms (which includes Apple mobile simulators running on AMD64 architecture).

  • Adds conditional compilation logic to differentiate DEBUG (0xb08) and RELEASE (0x2a0) offset values for Unix builds
  • Aligns AMD64 implementation with the existing ARM64 pattern for the same constant

Comment on lines +574 to +576
#else
#define OFFSETOF__Thread__m_pInterpThreadContext 0x2a0
#endif
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

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

[nitpick] The #else and #endif directives should include comment markers for clarity, similar to how it's done in the ARM64 version of this file (see src/coreclr/vm/arm64/asmconstants.h lines 310-312).

Suggested change:

#ifdef _DEBUG
#define OFFSETOF__Thread__m_pInterpThreadContext 0xb08
#else // _DEBUG
#define OFFSETOF__Thread__m_pInterpThreadContext 0x2a0
#endif // _DEBUG
Suggested change
#else
#define OFFSETOF__Thread__m_pInterpThreadContext 0x2a0
#endif
#else // _DEBUG
#define OFFSETOF__Thread__m_pInterpThreadContext 0x2a0
#endif // _DEBUG

Copilot uses AI. Check for mistakes.
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.

3 participants