-
Notifications
You must be signed in to change notification settings - Fork 571
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i#5383: Fix macOS preload on a64 (#7170)
This fixes several build and runtime issues under macOS on ARM64 on macOS 14.4.1 (Sonoma). - `FEATURE_PAUTH` is now detected on macOS using a sysctl (capability MSRs cannot be read in userspace on M3 at least). - In the preload library and os.c, `_init` needs `__attribute__((constructor))` to be run by dyld. - `PLATFORM_SUPPORTS_SCATTER_GATHER` is broken, disabled for now on a64 macOS. - Fixed sigcontext/mcontext conversion which assumes old `simd` size and was failing on an assert. Known issues that remain: - VM allocation frequently but nondeterministically fails reachability constraints. `-vm_size 500M` seems to fix this. #7171 adds this flag to tests on macOS+ARM64. Another option is to make this the default on macOS+ARM64. - Sometimes some bookkeeping asserts in `vmh_exit` are reached upon process exit. The end result is that the `bbcount` tool works on a simple toy program on macOS, in debug mode, without hitting any asserts: ``` bin64/drrun -debug -vm_size 500M -c api/bin/libbbcount.dylib -- ./main ``` Issue #5383
- Loading branch information
Showing
7 changed files
with
98 additions
and
40 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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