Reify#10
Conversation
Skip test if simplexml extension is disabled.
These changes are based on a previous PR by @ndossche to reduce codebloat: php#18436 For zend_parse_arg_str_weak() we can return a `zend_string*` directly, as errors can be indicated by a NULL pointer return. For zend_parse_arg_double_weak() we can return a `double` directly, as we can represent ZPP errors via `NAN` as booleans and integers never coerce to NAN. One might think that the string `'NAN'` can be coerced to double `NAN`, however PHP doesn't allow this coercion. And an explicit cast to double via `(float)` of such a string results in 0. For zend_parse_arg_bool_weak() we instead create a new enum zpp_parse_bool_status that represents a tri-state which we return. Allowing us to return the boolean value via the return type instead of using an out pointer.
Extract php_is_valid_samesite_value() in ext/standard/head.c as a shared validation function that enforces the SameSite whitelist (Strict, Lax, None, or empty string) with case-insensitive matching. Apply validation in both setcookie()/setrawcookie() (replacing the existing TODO comment) and the session.cookie_samesite INI handler. Previously arbitrary strings including CRLF sequences were accepted and appended verbatim into the Set-Cookie header.
* PHP-8.4: ext/spl: Fix SplFixedArray::setSize leak when destructor grows during clear.
* PHP-8.5: ext/spl: Fix SplFixedArray::setSize leak when destructor grows during clear.
Closes php#21681 In case of persistent connection it was not checked if the connection was still alive always assuming it was. If the connection was broken this caused PHP to reuse the broken connection over and over. dbdead function is supported by all dblib implementation (MS, Sybase, FreeTDS). Change tested manually, see FreeTDS/freetds#711 (comment) Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Replace direct malloc/realloc calls with OOM-safe pemalloc/perealloc (persistent: true) counterparts. Fixes phpGH-19200 Fixes phpGH-17013 Closes phpGH-21625
This is from unrelased refactoring: e1c5049#diff-04979daf330cd412502ec8ebf4a363d608a73f034687a0dd07328fd0969f2813L2070-R2069 . It was a clear mistake that can lead to the over-read.
…hp#21835) Fixes phpGH-21831. `getHash()` runs while `SplObjectStorage` is looking up an object. Letting it mutate a storage from there is unsafe, because the caller may still be iterating the table that just changed underneath it. This makes that fail immediately with an `Error` instead of trying to handle it one caller at a time. The existing concurrent deletion tests now cover the new rule, and phpGH-21831 has a direct regression test. This targets master, so the behavior change is also noted in `UPGRADING`.
…dren. Add a refcount on the child iterator across rewind/next/valid/current/key calls so user methods can detach themselves without freeing the object mid-call. close phpGH-21933
* PHP-8.4: Fix phpGH-21927: Use-after-free of self-freeing MultipleIterator children.
* PHP-8.5: Fix phpGH-21927: Use-after-free of self-freeing MultipleIterator children.
set_client_option_2d() built the temporary key string with the connection's persistent flag but always released it with persistent=1. On a duplicate-key update of the connect_attr hash, zend_hash_update() does not retain the passed key, so the caller-owned non-persistent string was freed via free() instead of efree(), tripping the IS_STR_PERSISTENT assertion in debug builds and mismatching allocators in release. Reachable by retrying mysqli_real_connect() on a handle whose first connect failed, since mysqlnd re-adds _client_name and _server_host on every connect attempt. close phpGH-21931
* PHP-8.4: ext/mysqlnd: Fix persistent free of non-persistent connect_attr key.
* PHP-8.5: ext/mysqlnd: Fix persistent free of non-persistent connect_attr key.
- use zend_hash_str_lookup for locale char table management - replace the separate zend_hash_find_ptr + zend_string_init + zend_hash_add_ptr + zend_string_release sequence with a single zend_hash_str_lookup() call which handles find-or-insert in one hash traversal and manages persistent key creation internally. close phpGH-21312
…[-Werror=unused-but-set-variable=]
Restores 79aaeea, which was likely lost in the rebase of 76d7c61 Fixes phpGH-21746 Closes phpGH-21891
* PHP-8.5: Fix incorrect trace stop type
Add stream context options psk_client_cb and psk_server_cb that let clients and servers negotiate pre-shared key authentication on both TLS 1.2 and TLS 1.3. Callbacks return an Openssl\Psk instance carrying the key and, on clients, the identity, or null to refuse PSK. A new final Openssl\Psk class is added for that purpose, with readonly $psk and $identity properties and MAX_PSK_LEN / MAX_IDENTITY_LEN constants. Closes phpGH-22057
This build is not useful for multiple reasons: - Legitimate API changes keep making the build red. Frequently it takes 3rd party extension developers months to fix these issues. - Once we're annoyed enough by the red build we skip it and then don't revert it way after it has been fixed. - True accidental API changes are incredibly rare. I don't believe I've experienced one yet. - This build only runs for master, which is also the branch where accidental changes are least problematic. Closes phpGH-21980
* PHP-8.2: [skip ci] Remove PECL build
* PHP-8.3: [skip ci] Remove PECL build
* PHP-8.4: [skip ci] Remove PECL build
* PHP-8.5: [skip ci] Remove PECL build
Signed-off-by: azjezz <azjezz@protonmail.com>
Signed-off-by: Robert Landers <landers.robert@gmail.com>
Signed-off-by: Robert Landers <landers.robert@gmail.com>
Signed-off-by: Robert Landers <landers.robert@gmail.com>
Signed-off-by: Robert Landers <landers.robert@gmail.com>
Signed-off-by: Robert Landers <landers.robert@gmail.com>
Signed-off-by: Robert Landers <landers.robert@gmail.com>
Signed-off-by: Robert Landers <landers.robert@gmail.com> fix inheritance chaining Signed-off-by: Robert Landers <landers.robert@gmail.com> fix inheritance chaining Signed-off-by: Robert Landers <landers.robert@gmail.com>
Specialize concrete turbofish calls at compile time: Graph\dfs::<string,int>() compiles to a direct by-name call to the mangled monomorph and drops the per-call ZEND_VERIFY_GENERIC_ARGUMENTS opcode, making it byte-identical to a non-generic call. Monomorphs are synthesized and registered on first reference; the runtime verify/bind path remains as the fallback for non-concrete / inference-only call sites. Also: persist the generic value-check plan into opcache SHM, and gate destroy_op_array's monomorph-table scan on ZEND_ACC2_HAS_GENERIC_CALL_OPS so non-generic code is not taxed. PSL\Graph bench (aarch64, opcache, two-point Ir/iter): reified-vs-erased overhead 6.51%->4.14% (all) / 5.72%->4.19% (query); wall 9.04%->5.89% (no-JIT). Erased baseline unchanged; generics tax -37%. Digests identical across no-JIT/tracing/-n, generics .phpt 0 new regressions, valgrind-clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Important Review skippedToo many files! This PR contains 300 files, which is 150 over the limit of 150. To get a review, narrow the scope: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (300)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
No description provided.