emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subtle bug in intervals code


From: Eli Zaretskii
Subject: Re: Subtle bug in intervals code
Date: Wed, 18 Jul 2012 20:47:47 +0300

> Date: Wed, 18 Jul 2012 15:48:08 +0400
> From: Dmitry Antipov <address@hidden>
> 
> Commit 109118 (by me) introduces the following change in src/intervals.c, 
> function delete_interval:
> 
> @@ -1262,8 +1198,7 @@
>     register INTERVAL parent;
>     ptrdiff_t amt = LENGTH (i);
> 
> -  if (amt > 0)                       /* Only used on zero-length intervals 
> now.  */
> -    abort ();
> +  eassert (amt == 0);                /* Only used on zero-length intervals 
> now.  */
> 
>     if (ROOT_INTERVAL_P (i))
>       {
> 
> Now this eassert traps at interval with negative length. I'm not familiar with
> this subsystem enough to find (possible) bug quickly, so any help is 
> appreciated.
> The backtrace is:
> 
> #0  0x0000003fe1836567 in kill () at ../sysdeps/unix/syscall-template.S:82
> #1  0x000000000054f58c in fatal_error_signal (sig=<optimized out>) at 
> /home/dima/work/stuff/emacs/trunk/src/emacs.c:362
> #2  fatal_error_signal (sig=<optimized out>) at 
> /home/dima/work/stuff/emacs/trunk/src/emacs.c:332
> #3  <signal handler called>
> #4  0x0000003fe1836567 in kill () at ../sysdeps/unix/syscall-template.S:82
> #5  0x000000000054ec05 in abort () at 
> /home/dima/work/stuff/emacs/trunk/src/emacs.c:390
> #6  0x00000000005c0b0a in die (msg=<optimized out>, file=<optimized out>, 
> line=<optimized out>)
>      at /home/dima/work/stuff/emacs/trunk/src/alloc.c:6753
> #7  0x0000000000643ecb in delete_interval (i=<optimized out>) at 
> /home/dima/work/stuff/emacs/trunk/src/intervals.c:1201

Been there, done that:

  http://lists.gnu.org/archive/html/emacs-devel/2010-09/msg01138.html

My last message, here:

  http://lists.gnu.org/archive/html/emacs-devel/2010-09/msg01207.html

got no responses.  So the mystery is still a mystery (at least to me),
but one thing is certain: you must modify the assertion to

  eassert (amt <= 0);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]