https://bugs.openldap.org/show_bug.cgi?id=9017
--- Comment #16 from Howard Chu hyc@openldap.org --- kriszyp@gmail.com wrote:
Sorry, I should have added a little more detail. Specifically, I was seeing the `pos` variable in `mdb_page_flush` going over 2^31, and this being manifested in failed shift right here (resulting in 2^32 -1):
I've committed your first two patches as-is, and taken a different approach for the off_t issue. (size_t is only 32bit on a 32bit Windows system, so it's inappropriate.)
Do you still want the corresponding patch in 0.9? And can you please remind me where the 0.9 patch is? Thanks.
And please don't send HTML emails, plaintext only.
https://github.com/LMDB/lmdb/blob/mdb.master/libraries/liblmdb/mdb.c#L3711
Thanks, Kris
*From: *Howard Chu mailto:hyc@symas.com *Sent: *February 20, 2020 9:08 PM *To: *kriszyp@gmail.com mailto:kriszyp@gmail.com *Cc: *openldap-its@OpenLDAP.org mailto:openldap-its@openldap.org *Subject: *Re: (ITS#9017) Improving performance of commit sync in Windows
Howard Chu wrote:
There should be an off64_t type instead.
But it looks to me like only the env->me_size field could ever overflow,
and using size_t for that should be fine. The other uses are for the meta page, which is always either offset 0 or
offset 4096 (with 4KB pagesize), and the lockfile, which is always smaller than 2GB.
Ignore that, I was looking at the 0.9 branch when I wrote that.