Repository navigation
Conversation
kairosci
requested review from
Girgias,
bukka,
jorgsowa and
kocsismate
as code owners
October 24, 2026 14:07
TimWolla
reviewed
Oct 26, 2026
TimWolla
reviewed
Oct 26, 2026
Comment on lines
+3446
to
+3447
| /* Move the child's GC sequence forward without requesting new entropy. */ | ||
| php_random_pcgoneseq128xslrr64_advance(PS(random).state, 1); |
Member
There was a problem hiding this comment.
No, this does not work: This will advance the RNG’s state by the same amount for each child - without touching the parent state. As a result, each of the childs will have the same state.
And even if that worked, advancing by 1 means that the childs would immediately catch up with each other.
Contributor
Author
There was a problem hiding this comment.
I believe I've done. Now each child advances the PCG by a large distance derived from its own PID, without changing the parent's state or requesting new entropy.
Member
There was a problem hiding this comment.
Not great, but it should work indeed.
Contributor
Author
There was a problem hiding this comment.
How could I improve it further?
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.
Fixes #22616 by adding per-extension child initialization hooks and invalidating inherited session GC randomness after forks. Validated with debug NTS and ZTS builds, shared extensions, nested forks, FPM worker recycling, and unavailable entropy sources.