From kriszyp@gmail.com Fri Feb 21 04:12:44 2020 From: kriszyp@gmail.com To: openldap-bugs@openldap.org Subject: RE: Re: (ITS#9017) Improving performance of commit sync in Windows Date: Fri, 21 Feb 2020 04:12:43 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6015932378995962570==" --===============6015932378995962570== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable

Sorry, I should have added a littl= e =3D more detail. Specifically, I was seeing the `pos` variable in `mdb_page_flu=3D sh` going over 2^31, and this being manifested in failed shift right here (=3D resulting in 2^32 -1):

https=3D ://github.com/LMDB/lmdb/blob/mdb.master/libraries/liblmdb/mdb.c#L3711 <=3D /p>

 

Thanks,= Kris

 

F= ro=3D m: Howard Chu
Sent: Fe= br=3D uary 20, 2020 9:08 PM
To: = kr=3D iszyp(a)gmail.com
Cc: openldap-its(a)OpenLDAP.org
Subject: Re: (ITS#9017) Improvi= =3D ng performance of commit sync in Windows

 

Howard Chu wrote:

> There should be an off64_t type instead.

= =3D  

 

> But it looks to me like only the env->me_size field could =3D ever overflow,

> and using size_t for that shoul= =3D d be fine. The other uses are for the meta page, which is always either off=3D set 0 or

> offset 4096 (with 4KB pagesize), and = =3D the lockfile, which is always smaller than 2GB.

 

Ignore that, I was looking at the 0.= =3D 9 branch when I wrote that.

 

--

=3DC2=3DA0=3DC2=3DA0-- How= ard Chu

=3DC2=3DA0 CTO, Symas Corp.=3DC2=3DA0=3DC2=3DA0=3DC2= =3DA0=3DC2=3DA0=3DC2=3DA0=3D =3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0 http://www.symas.com

=3DC2=3DA0 Director, Highland Sun=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0 ht= tp://highlandsun.c=3D om/hyc/

=3DC2=3DA0 Chief Architect, OpenLDAP=3DC2= =3DA0 http=3D ://www.openldap.org/project/

 

<= =3D /div>=3D --===============6015932378995962570==--