Skip to content

Mysqlnd mem fixes#21929

Closed
devnexen wants to merge 2 commits intophp:masterfrom
devnexen:mysqlnd_mem_fixes
Closed

Mysqlnd mem fixes#21929
devnexen wants to merge 2 commits intophp:masterfrom
devnexen:mysqlnd_mem_fixes

Conversation

@devnexen
Copy link
Copy Markdown
Member

@devnexen devnexen commented May 2, 2026

No description provided.

devnexen added 2 commits May 2, 2026 05:35
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant