Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: core dump with autoloading failure.



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@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author