From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: Problems with source command in precmd()
Date: Sat, 19 Dec 2009 15:57:32 -0800 [thread overview]
Message-ID: <091219155732.ZM9104@torch.brasslantern.com> (raw)
In-Reply-To: <20091219224933.GA2785040@becquerel.illdefined.org>
On Dec 19, 10:49pm, Daniel Friesel wrote:
}
} there appear to be some crashes when using the source command in the
} precmd function.
I can reproduce this. It's sufficient to run zsh -f and enter
precmd() { source /dev/null }
at the prompt, then accept-line a second time.
I get a different backtrace with --enable-zsh-mem.
*** glibc detected *** double free or corruption (!prev): 0x09e79ae8 ***
(gdb) where
#0 0x003047a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x00345825 in raise () from /lib/tls/libc.so.6
#2 0x00347289 in abort () from /lib/tls/libc.so.6
#3 0x00379d2a in __libc_message () from /lib/tls/libc.so.6
#4 0x0038072f in _int_free () from /lib/tls/libc.so.6
#5 0x00380baa in free () from /lib/tls/libc.so.6
#6 0x0808f7e3 in zfree (p=0x9e79ae8, sz=64) at ../../zsh-4.0/Src/mem.c:1500
#7 0x080777b5 in hend (prog=0x0) at ../../zsh-4.0/Src/hist.c:1271
#8 0x0807b3f7 in loop (toplevel=1, justonce=0) at ../../zsh-4.0/Src/init.c:133
#9 0x0807e476 in zsh_main (argc=2, argv=0xbfea3854)
at ../../zsh-4.0/Src/init.c:1455
#10 0x0804cbea in main (argc=2, argv=0xbfea3854) at ../../zsh-4.0/Src/main.c:93
I'm not sure that's useful, as the first free() has already occurred by
then. No code around there has changed especially recently. Possibly a
heap is getting popped while a global still has a pointer into it?
next prev parent reply other threads:[~2009-12-19 23:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-19 22:49 Daniel Friesel
2009-12-19 23:57 ` Bart Schaefer [this message]
2010-01-04 12:15 ` Peter Stephenson
2010-01-04 20:41 ` Peter Stephenson
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=091219155732.ZM9104@torch.brasslantern.com \
--to=schaefer@brasslantern.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).