Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] db/gdbm rewrite
On Thu, 16 Feb 2017 06:30:50 -0800
Sebastian Gniazdowski <psprint2@xxxxxxxxxxxx> wrote:
> PS. Except "testkey" and "testval" don't have meta-characters.. But the
> patch for sure is needed. I've checked that length at "testdata" storing
> is 8+1.
Yes, it doesn't fix the problem, and it looks like it's a bit more
subtle than simply a wrong length.
I've managed to get valgrind reporting errors but with and without
--enable-zsh-mem. Here's one without: --enable-zsh-debug is on
but that's all.
I'm afraid that's all I'm going to have time to do.
pws
% zmodload zsh/db/gdbm
% ztie -d db/gdbm -f db.gdbm dbase
% dbase[testkey]=somewhat
==25034== Invalid write of size 1
==25034== at 0x80E0B78: metafy (utils.c:4652)
==25034== by 0x465CA27: gdbmgetfn (db_gdbm.c:319)
==25034== by 0x80AE5FF: getstrvalue (params.c:2120)
==25034== by 0x80AC838: getarg (params.c:1414)
==25034== by 0x80ADCE6: getindex (params.c:1814)
==25034== by 0x80AE345: fetchvalue (params.c:2030)
==25034== by 0x80AE02B: getvalue (params.c:1951)
==25034== by 0x80B05DF: assignsparam (params.c:2956)
==25034== by 0x8070BEB: addvars (exec.c:2462)
==25034== by 0x806D523: execsimple (exec.c:1173)
==25034== by 0x806DA25: execlist (exec.c:1312)
==25034== by 0x806D3F2: execode (exec.c:1130)
==25034== Address 0x41922b8 is 0 bytes after a block of size 8 alloc'd
==25034== at 0x400677E: malloc (vg_replace_malloc.c:195)
==25034== by 0x102AF2: gdbm_fetch (gdbmfetch.c:68)
==25034== by 0x465C9F6: gdbmgetfn (db_gdbm.c:310)
==25034== by 0x80AE5FF: getstrvalue (params.c:2120)
==25034== by 0x80AC838: getarg (params.c:1414)
==25034== by 0x80ADCE6: getindex (params.c:1814)
==25034== by 0x80AE345: fetchvalue (params.c:2030)
==25034== by 0x80AE02B: getvalue (params.c:1951)
==25034== by 0x80B05DF: assignsparam (params.c:2956)
==25034== by 0x8070BEB: addvars (exec.c:2462)
==25034== by 0x806D523: execsimple (exec.c:1173)
==25034== by 0x806DA25: execlist (exec.c:1312)
==25034==
Messages sorted by:
Reverse Date,
Date,
Thread,
Author