Skip to content

[ObjC] Fix handling of relative method selectors with MSVC #7049

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

Merged
merged 1 commit into from
Jul 8, 2025

Conversation

bdash
Copy link
Contributor

@bdash bdash commented Jul 6, 2025

The order that the operands to + are evaluated in is unspecified. Clang happens to evaluate them left to right and gives the expected answer. MSVC picks the opposite order and so the value it computes is off by 4.

This was resulting in missing method names when arm64 binaries containing Objective-C are analyzed on Windows.

@bdash bdash force-pushed the objc-relative-selectors-msvc branch from b8ff396 to dee7a25 Compare July 8, 2025 01:57
The order that the operands to `+` are evaluated in is unspecified. Clang
happens to evaluate them left to right and gives the expected answer.
MSVC picks the opposite order and so the value it computes is off by 4.

This was resulting in missing method names when arm64 binaries
containing Objective-C are analyzed on Windows.
@bdash bdash force-pushed the objc-relative-selectors-msvc branch from dee7a25 to 9aa5359 Compare July 8, 2025 01:58
@bdash bdash merged commit 9aa5359 into dev Jul 8, 2025
1 check passed
@bdash bdash deleted the objc-relative-selectors-msvc branch July 8, 2025 02:00
@emesare emesare added this to the Helion milestone Jul 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants