-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Adjust OFFSETOF__Thread__m_pInterpThreadContext for Apple mobile simulators
#121442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
OFFSETOF__Thread__m_pInterpThreadContext for Apple mobile simulators
|
Tagging subscribers to this area: @BrzVlad, @janvorli, @kg |
janvorli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
There was a problem hiding this 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
| #else | ||
| #define OFFSETOF__Thread__m_pInterpThreadContext 0x2a0 | ||
| #endif |
Copilot
AI
Nov 13, 2025
There was a problem hiding this comment.
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| #else | |
| #define OFFSETOF__Thread__m_pInterpThreadContext 0x2a0 | |
| #endif | |
| #else // _DEBUG | |
| #define OFFSETOF__Thread__m_pInterpThreadContext 0x2a0 | |
| #endif // _DEBUG |
Description
This PR fixes builds for Apple mobile simulators.