[Top][All Lists]

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

Subtle bug in intervals code

From: Dmitry Antipov
Subject: Subtle bug in intervals code
Date: Wed, 18 Jul 2012 15:48:08 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1

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 
The backtrace is:

#0  0x0000003fe1836567 in kill () at ../sysdeps/unix/syscall-template.S:82
#1  0x000000000054f58c in fatal_error_signal (sig=<optimized out>) at 
#2  fatal_error_signal (sig=<optimized out>) at 
#3  <signal handler called>
#4  0x0000003fe1836567 in kill () at ../sysdeps/unix/syscall-template.S:82
#5  0x000000000054ec05 in abort () at 
#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 
#8  0x00000000006452cc in merge_interval_left (i=<optimized out>) at 
#9  0x000000000064c93a in set_text_properties (start=..., end=..., 
properties=..., object=..., coherent_change_p=...)
    at /home/dima/work/stuff/emacs/trunk/src/textprop.c:1306
#10 0x000000000064cb10 in Fset_text_properties (start=<optimized out>, end=<optimized 
out>, properties=<optimized out>,
    object=<optimized out>) at 
#11 0x00000000005e0379 in eval_sub (form=<optimized out>) at 
#12 0x00000000005e0af5 in Fprogn (args=...) at 
[...skipped a lot...]


reply via email to

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