[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: [LMDB] Unexpected behavior for MDB_MULTIPLE with zero-length page



On 12/02/17 05:19, Bryan Matsuo wrote:
I noticed that, for in a corner case of the mdb_cursor_put function when
MDB_MULTIPLE is provided, if the number of items is specified to be zero
this may lead to garbage data being written or a segfault. My intuition
would be that this is essentially a noop, but I also would have thought
EINVAL would be an acceptable error code

EINVAL.  If the key does not exist, you're asking LMDB to create a key
with no data.  That is not supported.  I'll file an ITS, with a few
other corner cases I noticed as well.