zsh-workers
 help / color / mirror / code / Atom feed
* Re: core dump with autoloading failure.
@ 2000-01-10  9:14 Sven Wischnowsky
  0 siblings, 0 replies; 3+ messages in thread
From: Sven Wischnowsky @ 2000-01-10  9:14 UTC (permalink / raw)
  To: zsh-workers


Peter Stephenson wrote:

> Tanaka Akira wrote:
> > zsh dumps core as follows:
> > 
> > Z:akr@thorax% Src/zsh -f
> > thorax% bindkey -e; autoload -U compinit; compinit -D 
> > thorax% compdef _xxx xxx; autoload -U _xxx
> > thorax% xxx 
> > _xxx: _xxx: function definition file not found
> > zsh: segmentation fault (core dumped)  Src/zsh -f
> 
> My guess is this.  Sven, are there are any more like this?

Dunno how I overlooked that one.

I found another problem in hrealloc() at the weekend.

As far as I can see by looking through the code this should be ok now.

Bye
 Sven

diff -ru ../z.old/Src/mem.c Src/mem.c
--- ../z.old/Src/mem.c	Mon Jan 10 10:07:45 2000
+++ Src/mem.c	Mon Jan 10 10:08:39 2000
@@ -441,6 +441,7 @@
 #endif
 	    return NULL;
 	}
+#ifndef USE_MMAP
 	if (old > HEAP_ARENA_SIZE || new > HEAP_ARENA_SIZE) {
 	    size_t n = HEAP_ARENA_SIZE > new ? HEAPSIZE : new + sizeof(*h);
 
@@ -451,6 +452,7 @@
 	}
 	h->used = new;
 	return arena(h);
+#endif
     }
     DPUTS(h->used > HEAP_ARENA_SIZE, "BUG: hrealloc at invalid address");
     if (h->used + (new - old) <= HEAP_ARENA_SIZE) {

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


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

* Re: core dump with autoloading failure.
  2000-01-09 16:03 Tanaka Akira
@ 2000-01-09 18:44 ` Peter Stephenson
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Stephenson @ 2000-01-09 18:44 UTC (permalink / raw)
  To: zsh-workers

Tanaka Akira wrote:
> zsh dumps core as follows:
> 
> Z:akr@thorax% Src/zsh -f
> thorax% bindkey -e; autoload -U compinit; compinit -D 
> thorax% compdef _xxx xxx; autoload -U _xxx
> thorax% xxx 
> _xxx: _xxx: function definition file not found
> zsh: segmentation fault (core dumped)  Src/zsh -f

My guess is this.  Sven, are there are any more like this?

Index: Src/mem.c
===================================================================
RCS file: /home/pws/CVSROOT/projects/zsh/Src/mem.c,v
retrieving revision 1.3
diff -u -r1.3 mem.c
--- Src/mem.c	1999/12/21 15:18:28	1.3
+++ Src/mem.c	2000/01/09 18:11:45
@@ -181,7 +181,11 @@
     for (h = heaps; h; h = n) {
 	n = h->next;
 	DPUTS(h->sp, "BUG: old_heaps() with pushed heaps");
+#ifdef USE_MMAP
+	munmap((void *) h, sizeof(*h));
+#else
 	zfree(h, sizeof(*h));
+#endif
     }
     heaps = old;
     fheap = NULL;

-- 
Peter Stephenson <pws@pwstephenson.fsnet.co.uk>


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

* core dump with autoloading failure.
@ 2000-01-09 16:03 Tanaka Akira
  2000-01-09 18:44 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Tanaka Akira @ 2000-01-09 16:03 UTC (permalink / raw)
  To: zsh-workers

zsh dumps core as follows:

Z:akr@thorax% Src/zsh -f
thorax% bindkey -e; autoload -U compinit; compinit -D 
thorax% compdef _xxx xxx; autoload -U _xxx
thorax% xxx 
_xxx: _xxx: function definition file not found
zsh: segmentation fault (core dumped)  Src/zsh -f
Z:akr@thorax% 

(gdb) where
#0  0x400ed5ec in free () from /lib/libc.so.6
#1  0x400ed59d in free () from /lib/libc.so.6
#2  0x8081196 in zfree (p=0x401eb000, sz=16) at mem.c:1397
#3  0x808079c in old_heaps (old=0x40014000) at mem.c:184
#4  0x401ce901 in callcompfunc (s=0x40014a98 "", fn=0x8128840 "_main_complete") at compcore.c:730
#5  0x401cf29d in makecomplist (s=0x40014a98 "", incmd=0, lst=0) at compcore.c:884
#6  0x401cd3b8 in do_completion (dummy=0x401b46e8, dat=0xbffff83c) at compcore.c:313
#7  0x8083f72 in runhookdef (h=0x401b46e8, d=0xbffff83c) at module.c:1610
#8  0x401a6dc4 in docompletion (s=0x810fbb0 "", lst=0, incmd=0) at zle_tricky.c:1680
#9  0x401a3f5a in docomplete (lst=0) at zle_tricky.c:741
#10 0x401a2bb3 in expandorcomplete (args=0x401b4664) at zle_tricky.c:260
#11 0x401a27dd in completecall (args=0x401b4664) at zle_tricky.c:165
#12 0x40197f93 in execzlefunc (func=0x401b25a8, args=0x401b4664) at zle_main.c:645
#13 0x4019799c in zleread (lp=0x81017c8 "%m%# ", rp=0x0, flags=3) at zle_main.c:564
#14 0x8073d32 in inputline () at input.c:265
#15 0x8073c25 in ingetc () at input.c:210
#16 0x806d138 in ihgetc () at hist.c:242
#17 0x8079310 in gettok () at lex.c:560
#18 0x8078c41 in yylex () at lex.c:313
#19 0x808ba60 in parse_event () at parse.c:105
#20 0x8071694 in loop (toplevel=1, justonce=0) at init.c:115
#21 0x8051199 in main (argc=2, argv=0xbffffb38) at ./main.c:89
(gdb) 
-- 
Tanaka Akira


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

end of thread, other threads:[~2000-01-10  9:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-10  9:14 core dump with autoloading failure Sven Wischnowsky
  -- strict thread matches above, loose matches on Subject: below --
2000-01-09 16:03 Tanaka Akira
2000-01-09 18:44 ` 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).