unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Subtle bug in intervals code
@ 2012-07-18 11:48 Dmitry Antipov
  2012-07-18 13:19 ` Andreas Schwab
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Dmitry Antipov @ 2012-07-18 11:48 UTC (permalink / raw)
  To: Emacs development discussions

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
#8  0x00000000006452cc in merge_interval_left (i=<optimized out>) at /home/dima/work/stuff/emacs/trunk/src/intervals.c:1479
#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 /home/dima/work/stuff/emacs/trunk/src/textprop.c:1244
#11 0x00000000005e0379 in eval_sub (form=<optimized out>) at /home/dima/work/stuff/emacs/trunk/src/eval.c:2176
#12 0x00000000005e0af5 in Fprogn (args=...) at /home/dima/work/stuff/emacs/trunk/src/eval.c:362
[...skipped a lot...]

Dmitry



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-07-19  7:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-18 11:48 Subtle bug in intervals code Dmitry Antipov
2012-07-18 13:19 ` Andreas Schwab
2012-07-18 21:35   ` Paul Eggert
2012-07-19  7:04   ` Stefan Monnier
2012-07-18 17:47 ` Eli Zaretskii
2012-07-18 18:33 ` Eli Zaretskii
2012-07-18 19:27   ` Paul Eggert
2012-07-18 19:44     ` Eli Zaretskii
2012-07-18 21:36       ` Paul Eggert

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).