Skip to content

[pull] master from php:master#1092

Merged
pull[bot] merged 2 commits into
turkdevops:masterfrom
php:master
Jul 15, 2026
Merged

[pull] master from php:master#1092
pull[bot] merged 2 commits into
turkdevops:masterfrom
php:master

Conversation

@pull

@pull pull Bot commented Jul 15, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

realFlowControl and others added 2 commits July 15, 2026 14:28
For __APPLE__ && __aarch64__ && ZTS, this moves the JIT buffer out of the OPcache shared memory and creates a dedicated mapping.

Background:

OPcache JIT is currently disabled for ZTS builds on Apple Silicon. The JIT buffer normally lives at the end of OPcache's MAP_SHARED | MAP_ANON allocation. In ZTS, one thread may generate code while another executes existing code, so the buffer must remain executable while it is writable.

Apple Silicon rejects RWX anonymous mappings with EPERM. Apple's supported solution is MAP_JIT with pthread_jit_write_protect_np(), which provides per-thread write protection, but macOS rejects MAP_JIT | MAP_SHARED with EINVAL. The existing combined OPcache/JIT mapping won't work on Apple Silicon.

Fixes GH-13400
Closes GH-22712
```php
<?php
$too_large = gmp_init("18446744073709551616");

var_dump(gmp_init(2) ** $too_large);
var_dump(gmp_init(2) << $too_large);
```
```
object(GMP)#3 (1) {
  ["num"]=>
  string(1) "1"
}
object(GMP)#2 (1) {
  ["num"]=>
  string(1) "2"
}
```
This PR fix the overflow by rejecting large gmp objects in these
calculation (throws ValueError)
@pull pull Bot locked and limited conversation to collaborators Jul 15, 2026
@pull pull Bot added the ⤵️ pull label Jul 15, 2026
@pull pull Bot merged commit e2ea940 into turkdevops:master Jul 15, 2026
0 of 2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants