I guess that "sqlite3_set_auxdata" cannot be called by the xStep
implementation of an aggregate function.
The doc says:
"The following two functions may be used by scalar SQL functions to
associate metadata with argument values."
I will try with "sqlite3_aggregate_context".
Sorry for the disturbance.

On Sat, Jan 14, 2012 at 10:36 PM, gwenn <gwenn.k...@gmail.com> wrote:
>
> Hello,
> I am trying to add custom aggregation function support in a golang driver 
> (scalar functions are ok).
> While testing, I got this:
> *** glibc detected *** ./6.out: realloc(): invalid pointer: 
> 0x0000000002daa1c5 ***
> ======= Backtrace: =========
> /lib/x86_64-linux-gnu/libc.so.6(+0x72656)[0x2b9a7b5da656]
> /lib/x86_64-linux-gnu/libc.so.6(realloc+0x312)[0x2b9a7b5e0762]
> /home/gwen/Test/sqlite-autoconf-3070900/.libs/libsqlite3.so.0(+0x30387)[0x2b9a7b2ec387]
> /home/gwen/Test/sqlite-autoconf-3070900/.libs/libsqlite3.so.0(+0x16a5b)[0x2b9a7b2d2a5b]
> /home/gwen/Test/sqlite-autoconf-3070900/.libs/libsqlite3.so.0(+0x234da)[0x2b9a7b2df4da]
> /home/gwen/Test/sqlite-autoconf-3070900/.libs/libsqlite3.so.0(sqlite3_set_auxdata+0xb6)[0x2b9a7b2e2d86]
>
> I just have enough skills to debug with gdb and to find this line:
> 62056: pVdbeFunc = sqlite3DbRealloc(pCtx->s.db, pVdbeFunc, nMalloc);
>
> Could you please help me find what I am doing wrong?
> I just call sqlite3_set_auxdata in my xStep function.
> Thanks.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to