From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27113 invoked by alias); 19 Dec 2009 23:57:56 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27537 Received: (qmail 26627 invoked from network); 19 Dec 2009 23:57:55 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <091219155732.ZM9104@torch.brasslantern.com> Date: Sat, 19 Dec 2009 15:57:32 -0800 In-reply-to: <20091219224933.GA2785040@becquerel.illdefined.org> Comments: In reply to Daniel Friesel "Problems with source command in precmd()" (Dec 19, 10:49pm) References: <20091219224933.GA2785040@becquerel.illdefined.org> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Problems with source command in precmd() MIME-version: 1.0 Content-type: text/plain; charset=us-ascii 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?