Skip to content

Align the Windows OPcache JIT buffer - #25262

Merged
shivammathur merged 2 commits into
php:PHP-8.4from
shivammathur:fix/gh25213-windows-jit-buffer
Nov 12, 2026
Merged

shivammathur merged 2 commits into
php:PHP-8.4from
shivammathur:fix/gh25213-windows-jit-buffer

Conversation

@shivammathur

Copy link
Copy Markdown
Member

The Windows SHM header is already accounted for by pos. Using the full mapping size keeps the JIT buffer page-aligned and prevents crashes when opcache fills up.

Fixes #25213.

@shivammathur
shivammathur force-pushed the fix/gh25213-windows-jit-buffer branch from 41559b3 to 83d6fc5 Compare November 9, 2026 15:29

@arnaud-lb arnaud-lb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me!

Could you add an assertion in zend_jit_startup() or in accel_post_startup() to check that buf is page-aligned?

@shivammathur

shivammathur commented Nov 12, 2026 •

Copy link
Copy Markdown
Member Author

@arnaud-lb I have added the assertion.

CI failure is unrelated. ubuntu-26.04 has an issue with networking for 32-bit binaries in Docker.
Ref: actions/runner-images#14790

@shivammathur
shivammathur merged commit 6144bac into php:PHP-8.4 Nov 12, 2026
32 of 34 checks passed
shivammathur added a commit that referenced this pull request Nov 12, 2026
* PHP-8.6:
  Align the Windows OPcache JIT buffer (#25262)
erkia pushed a commit to erkia/php-src that referenced this pull request Nov 12, 2026
* PHP-8.4:
  Align the Windows OPcache JIT buffer (php#25262)
erkia pushed a commit to erkia/php-src that referenced this pull request Nov 12, 2026
* PHP-8.5:
  Align the Windows OPcache JIT buffer (php#25262)
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