Skip to content

Run MACOS ZTS tests on push - #13375

Closed
dstogov wants to merge 14 commits into
php:masterfrom
dstogov:macos_zts_jit
Closed

dstogov wants to merge 14 commits into
php:masterfrom
dstogov:macos_zts_jit

Conversation

@dstogov

@dstogov dstogov commented Feb 12, 2024

Copy link
Copy Markdown
Member

No description provided.

@dstogov
dstogov changed the base branch from PHP-8.2 to master February 12, 2024 11:27
@dstogov

dstogov commented Feb 12, 2024

Copy link
Copy Markdown
Member Author

I gave up :(

@dstogov dstogov closed this Feb 12, 2024
@devnexen

Copy link
Copy Markdown
Member

It s tough, see. As you implied, we need to officially sign the binary. Unlike most of other oses, macos needs policies files for permissions.

@dstogov

dstogov commented Feb 13, 2024

Copy link
Copy Markdown
Member Author

It s tough, see. As you implied, we need to officially sign the binary. Unlike most of other oses, macos needs policies files for permissions.

I can't verify this, but it seems ZTS+JIT can only work if we sign PHP with the following entitlements.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.security.cs.allow-jit</key>
    <true/>
    <key>com.apple.security.cs.allow-unsigned-executable-memory</key>
    <true/>
</dict>
</plist>

I suppose, this should make pthread_jit_write_protect_supported_np() return TRUE, and then we should be able to use pthread_jit_write_protect_np().

I'm not completely sure if this will work, because MAP_JIT may conflict with MAP_SHARED.

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.

2 participants