From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh-workers@zsh.org
Subject: Re: [PATCH] db/gdbm rewrite
Date: Thu, 16 Feb 2017 15:11:52 +0000 [thread overview]
Message-ID: <20170216151152.0f5a07ef@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <1487255450.1882152.883095336.5DDBE902@webmail.messagingengine.com>
On Thu, 16 Feb 2017 06:30:50 -0800
Sebastian Gniazdowski <psprint2@fastmail.com> 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==
next prev parent reply other threads:[~2017-02-16 15:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-14 12:20 Sebastian Gniazdowski
2017-02-15 10:22 ` Sebastian Gniazdowski
2017-02-16 10:16 ` Peter Stephenson
2017-02-16 11:46 ` Sebastian Gniazdowski
2017-02-16 12:52 ` Peter Stephenson
2017-02-16 14:25 ` Sebastian Gniazdowski
2017-02-16 14:30 ` Sebastian Gniazdowski
2017-02-16 15:11 ` Peter Stephenson [this message]
2017-02-16 16:03 ` Sebastian Gniazdowski
2017-02-16 16:25 ` Sebastian Gniazdowski
2017-02-16 16:36 ` Peter Stephenson
2017-02-16 17:12 ` Sebastian Gniazdowski
2017-02-16 18:16 ` Sebastian Gniazdowski
2017-02-19 0:43 (Fwd) " Bart Schaefer
2017-02-19 8:46 ` Sebastian Gniazdowski
2017-02-19 18:19 ` Bart Schaefer
2017-02-20 8:32 ` Sebastian Gniazdowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170216151152.0f5a07ef@pwslap01u.europe.root.pri \
--to=p.stephenson@samsung.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).