Re: switching to emacs
- Johannes Zellner wrote:
> > Looks like a memory allocation problem. I don't see this problem. Can youAh, this vim_free() is wrong. If you use <Leader> twice it will use a freed
> > link with "efence" or some other malloc() debugger to find out what causes
> > this problem?
> ElectricFence Aborting: free(4364fffc): address not from malloc().
> Program received signal SIGILL, Illegal instruction.
> 0x40280e01 in kill ()
> #0 0x40280e01 in kill ()
> #1 0x81b78b4 in ()
> #2 0x81b7200 in free ()
> #3 0x80cfc4c in vim_free (x=0x4364fffc) at misc2.c:1120
> #4 0x81290c3 in replace_termcodes (from=0x4364ff45 "<Leader>f", bufp=0xbfffeaa8, from_part=1, do_lt=1) at term.c:4495
string (and free it again). Just remove it:
*** term.c~ Sun Oct 15 18:37:14 2000
--- term.c Mon Oct 16 21:57:45 2000
*** 4492,4498 ****
s = p;
while (*s != NUL)
result[dlen++] = *s++;
src += len;
--- 4492,4497 ----
> term.c:4384No, the length of "<Leader>" is replaced by the value of "mapleader". Since
> * Allocate space for the translation. Worst case a single character is
> * replaced by 6 bytes (shifted special key), plus a NUL at the end.
> result = alloc((unsigned)STRLEN(from) * 6 + 1);
> 6 seems not to be enough any more.
> Must be something like strlen("LocalLeader") + 1 == (12)
the space allocated is six times the original length, we have 8 * 6 = 48
characters maximal. There is a limit of up to 30 characters (it used to be
"<Map>" which was 5 * 6 = 30). Replacing "<LocalLeader>" would allow 13 * 8 =
104 chars. But who is going to type that?
> But there are more problems. Vim crashes at different positions if I'vePlease find out where. The language translations may cause problems when the
allocated memory is only enough for the English text. I might have missed
some places where this happens.
DINGO: Wicked wicked Zoot ... she is a bad person and she must pay the
penalty. And here in Castle Anthrax, we have but one punishment
... you must tie her down on a bed ... and spank her. Come!
GIRLS: A spanking! A spanking!
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar Bram@... http://www.moolenaar.net \\\
\\\ Vim: http://www.vim.org ICCF Holland: http://iccf-holland.org ///