chore: build against php-src master (8.6.0-dev) - #14
Open
somethingwithproof wants to merge 15 commits into
Open
Conversation
Without tests/data the SKIPIF blocks skip 16 of the 22 tests, so CI reported green while most of the suite never ran. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Both were written against an older librrd and fail against 1.7.2 and 1.11.0 alike; they were never noticed because the fixtures were missing. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Called with one argument, zend_parse_parameters never writes start_time, so the following `if (start_time)` dereferenced whatever the stack happened to hold and copied it into the --start option. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
An integer key gave RRDUpdater::update() a NULL zend_string, save() on a bare RRDCreator merged undefined zvals, and every method assumed __construct had run; all three reached librrd through a NULL pointer. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
ZEND_LTOA writes its terminator at the return value of snprintf, so an 11-byte buffer overflowed once a timestamp needed more than ten digits, and rrd_fetch's 32-bit loop counter wrapped past the end of librrd's data. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
A second __construct kept the previous step, data sources and archives, so the new file was written from the old object's definition. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Both write a file the caller names, and both skipped the check that rrd_create() and RRDGraph::save() already perform. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
convert_to_string() edited the array in place, so a non-string option changed the caller's variable and every by-value copy of it. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
zval_get_string() hands back an empty string with an exception already pending, so the original Error was masked by whatever librrd then reported. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Converting a value runs __toString, which can call __construct to repoint the object past the open_basedir check, or setOptions to free the array being walked. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
…t list Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
The "was not constructed" guards test for NULL, and rrd_fetch keyed its per-source arrays by name, so duplicate names left the walk short of ds_cnt entries. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
… objects The duplicate-name case is a crash on master: renaming one ds_nam over another in the header leaves rrd_fetch walking past the end of the array it built. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
ZEND_LTOA, zval_dtor and XtOffsetOf are all gone from php-src master, so the extension no longer compiles on 8.6.0-dev. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Keeps the 8.6 build from breaking again without letting an unrelated upstream change gate pull requests. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
This was referenced Aug 21, 2026
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.
The extension does not compile against php-src master. Three macros it uses have been removed:
UPGRADING.INTERNALScovers the first two ("ZEND_LTOA() ... has been removed, as it was unsafe" and "The zval_dtor() alias of zval_ptr_dtor_nogc() has been removed");XtOffsetOfwent with commit 4384e7d6. Master is currently8.6.0-dev, so this is nearer than it sounds.All three replacements are the definitions the macros already expanded to, so nothing changes on supported versions:
ZEND_LTOA→snprintfwithZEND_LONG_FMT(already done in the timestamp fix this stacks on)zval_dtor(z)→zval_ptr_dtor_nogc(z)— 18 sites, and the macro was literally#define zval_dtor(zval) zval_ptr_dtor_nogc(zval)XtOffsetOf(t, f)→offsetof(t, f)— 6 sites, likewise#define XtOffsetOf(s_type, field) offsetof(s_type, field)Validation
Built php-src master (
4384e7d6, 8.6.0-dev) from source and built the extension against it: fails before this change, builds after, 31/31 tests pass. Also 31/31 on 8.1, 8.3, 8.4 and 8.5, so nothing regressed on the supported matrix.An
8.6matrix entry is included so this cannot drift again. It is markedexperimentaland wired tocontinue-on-error, so a break in php-src master reports without gating pull requests.actionlintis clean.Stack order. This is part of a series, each building on the one before. Merge order:
#11 (test suite) → #12 (memory safety) → #13 (open_basedir, value semantics) → #14 (php-src master) → #15 (librrd argv) → #16 (argument builder) → #17 (autoconf). Commits below this PR's own belong to the ones underneath it.