Skip to content

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

Closed
iliaal wants to merge 1 commit intomasterfrom
fix/dba-lmdb-cursor-write-txn
Closed

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

Conversation

@iliaal
Copy link
Copy Markdown
Owner

@iliaal iliaal commented May 7, 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.
@iliaal iliaal force-pushed the fix/dba-lmdb-cursor-write-txn branch from 5c033b5 to f79c75c Compare May 7, 2026 23:48
@iliaal
Copy link
Copy Markdown
Owner Author

iliaal commented May 8, 2026

Superseded by upstream PR php#21979

@iliaal iliaal closed this May 8, 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