PFA: Extend local pointer map after loading PFA from SHM - #23250
Open
arnaud-lb wants to merge 1 commit into
Open
PFA: Extend local pointer map after loading PFA from SHM#23250arnaud-lb wants to merge 1 commit into
arnaud-lb wants to merge 1 commit into
Conversation
When loading a PFA from SHM we may need to extend the local pointer map because the PFA may use pointers higher than CG(map_ptr_last). Similar synchronization happens in inheritance cache or when loading whole scripts.
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.
When loading a PFA from SHM we may need to extend the local pointer map because
the PFA may use pointers higher than CG(map_ptr_last). Similar synchronization
happens in inheritance cache 1 or when loading whole scripts 2.
The test reproduces under ASAN with Opcache enabled.
Bug found by Ryan @ Calif.io.
Footnotes
https://github.com/php/php-src/blob/eaac14a17a3d64c52ef1a0778bb65828cfce4eda/ext/opcache/ZendAccelerator.c#L2538-L2545 ↩
https://github.com/php/php-src/blob/7a2303f89bffa0ecc4b5877f1a701ce2d844c5a3/ext/opcache/zend_accelerator_util_funcs.c#L373-L375 ↩