Repository navigation
Admit NTS requests to OPcache SHM only in RINIT - #25509
Merged
Merged
Conversation
Without ZTS a request took the reader lock lazily, on its first use of SHM, and a restart only checked that no process held it (F_GETLK). A request is therefore invisible to a restart between RINIT and its first compilation, although persistent_compile_file() already looks the script up in the shared hash before taking the lock: another process can clean SHM meanwhile, and the request then uses the script it found. A restart could also start between its F_GETLK check and the lock taken by a reader. Do as under ZTS since phpGH-8739: a request becomes a reader only in RINIT and stays one until accel_post_deactivate(), and a restart takes the write lock on the reader byte for its duration, so readers wait for it in RINIT.
* PHP-8.4: (91 commits) [skip ci] Add NEWS entry for php#25674 ext/bz2: Fix NULL dereference when compress.bzip2:// open fails in write mode ext/dom: Reject DTD declaration nodes in adoptNode() Fix iconv_mime_encode() overflowing on a negative line-length (php#25485) ext/pgsql: pg_get_notify() result is never === false with opcache enabled ext/zlib: fix gzwrite() not reporting write errors Fix phpGH-25779: mysqli_fetch_object() crashes with JIT when the constructor keeps a reference and the result is discarded (php#25784) Fix stale string metadata in sodium_add() and sodium_increment() (php#25775) Sync `session.upload_progress.enabled` default in `php.ini-{development,production}` (php#25743) ext/pgsql: fix pg_fetch_object() JIT crash when constructor keeps $this Fix hash() and hash_file() hanging on invalid xxh3/xxh128 options (php#25777) ext/dom: fix Dom\Notation publicId and systemId property handlers Fix FFI::string() reading out of bounds for a negative size [ci skip] Update test title Fix phpGH-25558: FFI: struct with an enum field passed by value is described to libffi with a void element Fix OSS-Fuzz #588264417 Fix FPM log overflow when errno text exceeds the buffer (phpGH-25648) [skip ci] Use USE_TRACKED_ALLOC=1 for Symfony Preloading test [skip ci] Fix Symfony test without USE_TRACKED_ALLOC [skip ci] Skip assign_dim_undef_op_data_008.phpt when JIT is unavailable ...
arnaud-lb
added a commit
that referenced
this pull request
Nov 27, 2026
* PHP-8.6: Admit NTS requests to OPcache SHM only in RINIT (#25509)
Member
|
Thank you! |
iliaal
pushed a commit
to iliaal/php-src
that referenced
this pull request
Nov 27, 2026
* PHP-8.4: Admit NTS requests to OPcache SHM only in RINIT (php#25509)
iliaal
pushed a commit
to iliaal/php-src
that referenced
this pull request
Nov 27, 2026
* PHP-8.5: Admit NTS requests to OPcache SHM only in RINIT (php#25509)
arnaud-lb
added a commit
to lazerg/php-src
that referenced
this pull request
Nov 27, 2026
* PHP-8.4: (262 commits) ext/pdo_sqlite: crash when a collation callback closes the statement cursor Admit NTS requests to OPcache SHM only in RINIT (php#25509) ext/pgsql: pg_meta_data() numeric column names not integer keys with opcache [skip ci] Add NEWS entry for php#25674 ext/bz2: Fix NULL dereference when compress.bzip2:// open fails in write mode ext/dom: Reject DTD declaration nodes in adoptNode() Fix iconv_mime_encode() overflowing on a negative line-length (php#25485) ext/pgsql: pg_get_notify() result is never === false with opcache enabled ext/zlib: fix gzwrite() not reporting write errors Fix phpGH-25779: mysqli_fetch_object() crashes with JIT when the constructor keeps a reference and the result is discarded (php#25784) Fix stale string metadata in sodium_add() and sodium_increment() (php#25775) Sync `session.upload_progress.enabled` default in `php.ini-{development,production}` (php#25743) ext/pgsql: fix pg_fetch_object() JIT crash when constructor keeps $this Fix hash() and hash_file() hanging on invalid xxh3/xxh128 options (php#25777) ext/dom: fix Dom\Notation publicId and systemId property handlers Fix FFI::string() reading out of bounds for a negative size [ci skip] Update test title Fix phpGH-25558: FFI: struct with an enum field passed by value is described to libffi with a void element Fix OSS-Fuzz #588264417 Fix FPM log overflow when errno text exceeds the buffer (phpGH-25648) ...
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.
Prepared with an AI assistant (Claude), which also ran the reproduction and the tests on my machine; I reviewed the result. The text below is AI-generated (quoted, as asked in CONTRIBUTING.md).
🤖 Generated with Claude Code