Repository navigation
Conversation
… range opcache.jit_max_root_traces was taken as is to size the root traces buffer in shared memory. A value of 0 allocated no buffer at all, so the trace counters kept in its first element overlapped the next shared memory allocation. A negative value or one as large as 2**62 on 64-bit wrapped the buffer size around, failing the allocation or leaving a buffer far too small for the traces, which crashed once they got compiled. Reject values outside of 1 to the smaller of UINT32_MAX, as trace ids are uint32_t, and the number of root traces whose buffer size fits size_t. Like the other JIT settings, an invalid value emits a warning naming the range and keeps the default. A failure to allocate the buffer now also tells its size and which settings to change.
marc-mabe
force-pushed
the
fix/opcache-jit-max-root-traces
branch
from
November 25, 2026 09:50
1a3705b to
143cd03
Compare
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.
opcache.jit_max_root_traces was taken as is to size the root traces buffer in shared memory. A value of 0 allocated no buffer at all, so the trace counters kept in its first element overlapped the next shared memory allocation. A negative value or one as large as 2**62 on 64-bit wrapped the buffer size around, failing the allocation or leaving a buffer far too small for the traces, which crashed once they got compiled.
Reject values outside of 1 to the smaller of UINT32_MAX, as trace ids are uint32_t, and the number of root traces whose buffer size fits size_t. Like the other JIT settings, an invalid value emits a warning naming the range and keeps the default. A failure to allocate the buffer now also tells its size and which settings to change.