Update unstable PHP tag to 8.6.0beta1 - #194
Merged
Merged
Conversation
Keep apcu's from-source build for PHP 8.6: apcu's latest tagged release (v5.1.28, still current) calls php_verror() with the old 5-argument signature, and PHP 8.6's php_verror() (unchanged in 8.6.0beta1) only takes 4 arguments, so pie/pecl-installing the tagged release would still fail to compile. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012KziZyXrwQuJyZeFPm1aQ6
Reverts the from-source apcu build to confirm whether it's still needed against 8.6.0beta1, or whether apcu/PHP has since caught up. Revert this commit if CI shows the build still fails. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012KziZyXrwQuJyZeFPm1aQ6
php-ds/ext-ds now fails to build against 8.6.0beta1 too (a new regression, since it wasn't failing on alpha3), and pie hides the actual compiler/make error the same way it did for apcu. Add -v here as well so the real error shows up in the CI log. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012KziZyXrwQuJyZeFPm1aQ6
php-ds/ext-ds calls zend_parse_parameter(), which PHP 8.6 removed entirely (present through 8.5, gone on master/8.6.0beta1). Its built-in "l" spec handling was just a thin wrapper over the still public zend_parse_arg_long() inline helper, so patch the one call site to use that directly instead of pie-installing the (currently unbuildable) tagged release. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012KziZyXrwQuJyZeFPm1aQ6
PHP 8.6 changed the unserialize_callback_func INI global from char* to zend_string* (OnUpdateString -> OnUpdateStr in main.c), breaking igbinary's two direct reads of it in igbinary_unserialize_object(). Patch both call sites to pull the C string via ZSTR_VAL() instead. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012KziZyXrwQuJyZeFPm1aQ6
My previous sed-based fix kept a raw char* into PG(unserialize_callback_func)'s zend_string and re-read it later in the same function, after invoking arbitrary user PHP code via the unserialize callback -- if that callback reassigns unserialize_callback_func, the original zend_string can be freed, making the later read a use-after-free. igbinary/igbinary#419 already fixes this upstream (not yet merged) by taking an owned copy of the string up front. Cherry-pick that commit instead of carrying a subtly unsafe patch of our own. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012KziZyXrwQuJyZeFPm1aQ6
CI confirmed the build now reaches apcu/apcu (past the ext-ds and igbinary fixes) and fails there exactly as it did on alpha3: apcu's latest tagged release still calls the removed php_verror() with the old 5-argument signature. Restore the from-source build. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012KziZyXrwQuJyZeFPm1aQ6
msgpack/msgpack-php now fails to build against 8.6.0beta1 too (a new regression, past the ext-ds/igbinary/apcu breaks already fixed). Split it out and add -v to see the real compiler/make error. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012KziZyXrwQuJyZeFPm1aQ6
msgpack-php reads PG(unserialize_callback_func) as a char*, which PHP 8.6 changed to zend_string*. No upstream fix exists yet, so patch the two call sites ourselves. Unlike igbinary, msgpack reads the global only once, before invoking the callback (never re-reads it after), so a direct ZSTR_VAL/ZVAL_STR_COPY swap is safe -- there's no window for the callback to free the string out from under a held pointer. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012KziZyXrwQuJyZeFPm1aQ6
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.
No description provided.