From: Zoltan Hidvegi <hzoli@cs.elte.hu>
To: wfp5p@tigger.itc.virginia.edu (Bill Pemberton)
Cc: zsh-workers@math.gatech.edu (Zsh workers list)
Subject: Re: more on crashes
Date: Sat, 3 Aug 1996 00:19:02 +0200 (MET DST) [thread overview]
Message-ID: <199608022219.AAA07929@bolyai.cs.elte.hu> (raw)
In-Reply-To: <199608021842.OAA75406@tigger.itc.Virginia.EDU> from Bill Pemberton at "Aug 2, 96 02:42:34 pm"
> 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);
prev parent reply other threads:[~1996-08-02 22:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-08-02 17:38 Bill Pemberton
1996-08-02 18:04 ` Vinnie Shelton
1996-08-02 18:42 ` Bill Pemberton
1996-08-02 22:19 ` Zoltan Hidvegi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199608022219.AAA07929@bolyai.cs.elte.hu \
--to=hzoli@cs.elte.hu \
--cc=wfp5p@tigger.itc.virginia.edu \
--cc=zsh-workers@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).