https://bugs.openldap.org/show_bug.cgi?id=9920
--- Comment #20 from kero renault.cle@gmail.com --- I found another strange behavior when using this feature with my current program.
When I tried to access the first database entry containing large values (size of images, around 300KiB) either by using a get or a cursor (the get uses a cursor internally), it crashed. It works perfectly fine with the other entries and smaller entries from the other database (basically integers or small sets of integers).
I discovered that LMDB called the encrypt callback with the wrong input-output buffers. So, I logged them, and it seems that the size of those values (Mdb_val.mv_size) is wrong here and is equal to 2^32 - 32.
input ptr: 0x000000010138c010, length: 4294967264 output ptr: 0x00000001284c8010, length: 4294967264 thread 'main' panicked at library/core/src/panicking.rs:219:5: unsafe precondition(s) violated: ptr::copy_nonoverlapping requires that both pointer arguments are aligned and non-null and the specified memory ranges do not overlap
The last message is from the Rust std library, which uses a wrapper around memcpy when compiling in debug to detect these faulty usages.