On Mon, Feb 18, 2019 at 12:25 PM Richard Hipp <d...@sqlite.org> wrote:

> On 2/18/19, Arun - Siara Logics (cc) <a...@siara.cc> wrote:
> > If known, kindly point me to an existing open source implementation.
>
> https://www.sqlite.org/src/file/ext/misc/eval.c


Looks like the code was updated to use sqlite3_realloc64() despite what the
comment seems to imply.
Also, the max<int32_t> test was probably meant for
sqlite3_realloc(void*,int), to avoid overflowing that int,
while now realloc64() takes a sqlite3_uint64. My $0.02. --DD

      /* Using sqlite3_realloc64() would be better, but it is a recent
      ** addition and will cause a segfault if loaded by an older version
      ** of SQLite.  */

      zNew = p->nAlloc<=0x7fffffff ? sqlite3_realloc64(p->z, p->nAlloc) : 0;
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to