Skip to content

ext/dba: end LMDB cursor iteration on write/delete#21979

Open
iliaal wants to merge 1 commit intophp:masterfrom
iliaal:fix/dba-lmdb-cursor-write-txn
Open

ext/dba: end LMDB cursor iteration on write/delete#21979
iliaal wants to merge 1 commit intophp:masterfrom
iliaal:fix/dba-lmdb-cursor-write-txn

Conversation

@iliaal
Copy link
Copy Markdown
Contributor

@iliaal iliaal commented May 8, 2026

dba_insert/replace/delete on an LMDB handler started a write txn into LMDB_IT(txn) while dba_firstkey's cursor was still bound to the read txn in that slot, so the next dba_nextkey renewed a freed handle. Close the cursor and abort the read txn before starting the write txn, and bail out of dba_nextkey when no cursor is open.

dba_insert/replace/delete on an LMDB handler started a write txn into
LMDB_IT(txn) while dba_firstkey's cursor was still bound to the read txn
in that slot, so the next dba_nextkey renewed a freed handle. Close the
cursor and abort the read txn before starting the write txn, and bail
out of dba_nextkey when no cursor is open.
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