Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: more on crashes
- X-seq: zsh-workers 1906
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: wfp5p@xxxxxxxxxxxxxxxxxxxxxxx (Bill Pemberton)
- Subject: Re: more on crashes
- Date: Sat, 3 Aug 1996 00:19:02 +0200 (MET DST)
- Cc: zsh-workers@xxxxxxxxxxxxxxx (Zsh workers list)
- In-reply-to: <199608021842.OAA75406@xxxxxxxxxxxxxxxxxxxxxxx> from Bill Pemberton at "Aug 2, 96 02:42:34 pm"
- Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary
- Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368
> In all cases I'm doing --enable-zsh-mem .
>
> Compiled on AIX 4.2 it crashes right when I hit the backspace for the 10th
> time.
Bill mailed me that bindkey -v was necessary for the crash. I tried it and
after the 10th backpace zsh printed that someone tried to free more than
allocated.
Patch below.
Zoltan
--- Src/zle_utils.c 1996/07/28 19:50:55 2.11
+++ Src/zle_utils.c 1996/08/02 22:08:55
@@ -93,7 +93,7 @@
if ((vibuf[vibufspec].flags & CUTBUFFER_LINE) && !vilinerange)
vibufappend = 0;
if (!vibufappend || !vibuf[vibufspec].buf) {
- zsfree(vibuf[vibufspec].buf);
+ zfree(vibuf[vibufspec].buf, vibuf[vibufspec].len);
vibuf[vibufspec].buf = (char *)zalloc(ct);
memcpy(vibuf[vibufspec].buf, (char *) line + i, ct);
vibuf[vibufspec].len = ct;
@@ -115,7 +115,7 @@
} else {
/* Save in "1, shifting "1-"8 along to "2-"9 */
int n;
- zsfree(vibuf[34].buf);
+ zfree(vibuf[34].buf, vibuf[34].len);
for(n=34; n>26; n--)
vibuf[n] = vibuf[n-1];
vibuf[26].buf = (char *)zalloc(ct);
Messages sorted by:
Reverse Date,
Date,
Thread,
Author