Skip to content

[pull] master from php:master#736

Merged
pull[bot] merged 6 commits intodolfly:masterfrom
php:master
May 4, 2026
Merged

[pull] master from php:master#736
pull[bot] merged 6 commits intodolfly:masterfrom
php:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 4, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

LamentXU123 and others added 6 commits May 4, 2026 19:12
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 GH-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 GH-21312
@pull pull Bot locked and limited conversation to collaborators May 4, 2026
@pull pull Bot added the ⤵️ pull label May 4, 2026
@pull pull Bot merged commit c94cb02 into dolfly:master May 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants