Repository navigation
Fix Objective-C ARC assertions and add standalone ownership regressions - #3
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Including cest.h in an ARC Objective-C translation unit fails before any assertion runs: the value union contains a strong id, and the diagnostic/equality paths cast Objective-C objects to C pointers without an ARC bridge. A standalone reproducer confirms this without any FoxStep headers or implementation. libobjc2's unsigned-char BOOL also falls through the C _Generic mapping to the pointer wrapper.
Make assertion object values explicit synchronous borrows, bridge object-to-pointer conversions only under ARC, handle signed/unsigned char scalars, and preserve caller-provided feature-test macros. Add a runtime-only regression fixture and tests for nil, BOOL, object/pointer comparison, deallocation after the last assertion, and deliberately failing assertion diagnostics. Add the four Objective-C/Objective-C++ ARC/MRC combinations to macOS CI.
Validation performed locally on Linux x86_64 with Clang 23 and libobjc2 a21ae931e4c186312701d7a4a8e85204955965a6:
Apple CI is configured by this PR and has not been run locally. The separate weak-variable declaration error found in the FoxStep test belongs to that test and is not included here.