zsh-workers
 help / color / mirror / code / Atom feed
* Autoload syntax error causes heap bug warning
@ 2011-06-06 13:59 Bart Schaefer
  2011-06-06 14:38 ` Peter Stephenson
  2011-06-23 20:18 ` Peter Stephenson
  0 siblings, 2 replies; 3+ messages in thread
From: Bart Schaefer @ 2011-06-06 13:59 UTC (permalink / raw)
  To: zsh-workers

torch% fpath=(/tmp/test $fpath)
torch% . /tmp/test/cause_bug
/tmp/test/cause_bug:3: parse error near `\n'
torch% autoload cause_bug
torch% compdef cause_bug foo
torch% foo <TAB>
cause_bug:3: parse error near `\n'
7: Src/mem.c:217: BUG: old_heaps() with pushed heaps

torch% cat /tmp/test/cause_bug
: deliberate sytax error:
while
torch% 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Autoload syntax error causes heap bug warning
  2011-06-06 13:59 Autoload syntax error causes heap bug warning Bart Schaefer
@ 2011-06-06 14:38 ` Peter Stephenson
  2011-06-23 20:18 ` Peter Stephenson
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Stephenson @ 2011-06-06 14:38 UTC (permalink / raw)
  To: zsh-workers

On Mon, 6 Jun 2011 06:59:28 -0700
Bart Schaefer <schaefer@brasslantern.com> wrote:
> 7: Src/mem.c:217: BUG: old_heaps() with pushed heaps

I've seen lots of these over the years and never had time to
investigate, although part of the problem was reproducibility.

pws


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Autoload syntax error causes heap bug warning
  2011-06-06 13:59 Autoload syntax error causes heap bug warning Bart Schaefer
  2011-06-06 14:38 ` Peter Stephenson
@ 2011-06-23 20:18 ` Peter Stephenson
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Stephenson @ 2011-06-23 20:18 UTC (permalink / raw)
  To: zsh-workers

On Mon, 06 Jun 2011 06:59:28 -0700
Bart Schaefer <schaefer@brasslantern.com> wrote:
> torch% autoload cause_bug
> torch% compdef cause_bug foo
> torch% foo <TAB>
> cause_bug:3: parse error near `\n'
> 7: Src/mem.c:217: BUG: old_heaps() with pushed heaps
> 
> torch% cat /tmp/test/cause_bug
> : deliberate sytax error:
> while

So this is what's been causing all those years of error messages from
failed autoloads...

I'll look for more missing popheap()s.

Index: Src/exec.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/exec.c,v
retrieving revision 1.197
diff -p -u -r1.197 exec.c
--- Src/exec.c	19 Jun 2011 20:12:00 -0000	1.197
+++ Src/exec.c	23 Jun 2011 19:14:53 -0000
@@ -4343,6 +4343,7 @@ loadautofn(Shfunc shf, int fksh, int aut
     }
     if (!prog) {
 	zsfree(fname);
+	popheap();
 	return NULL;
     }
     if (ksh == 2 || (ksh == 1 && isset(KSHAUTOLOAD))) {

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-06-23 19:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-06 13:59 Autoload syntax error causes heap bug warning Bart Schaefer
2011-06-06 14:38 ` Peter Stephenson
2011-06-23 20:18 ` Peter Stephenson

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).