Skip to content

ext/dba: Use persistent flatfile iterator memory - #383

Closed
iliaal wants to merge 1 commit into
PHP-8.4from
fix/aph-dba-flatfile-request-allocation-7x8y-84-work
Closed

iliaal wants to merge 1 commit into
PHP-8.4from
fix/aph-dba-flatfile-request-allocation-7x8y-84-work

Conversation

@iliaal

@iliaal iliaal commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Match flatfile iterator buffer allocation and release to persistent connection lifetime so retained keys survive request boundaries safely.

A dba_popen() handle outlives the request, but flatfile kept the buffer of
the last returned key, inifile its current and last-fetched lines, and
cdb_make its hash list in it as emalloc'd memory, which the next request or
the close at shutdown then freed or read. flatfile now frees the key right
away and uses its file position as the iteration marker; inifile and
cdb_make allocate what they keep with the persistence of the handle.
@iliaal
iliaal force-pushed the fix/aph-dba-flatfile-request-allocation-7x8y-84-work branch from 378c34e to d148af8 Compare November 2, 2026 14:01
@iliaal

iliaal commented Nov 2, 2026

Copy link
Copy Markdown
Owner Author

Promoted upstream: php#25155

@iliaal iliaal closed this Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant