From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Subtle bug in intervals code Date: Wed, 18 Jul 2012 20:47:47 +0300 Message-ID: <831uk99d18.fsf@gnu.org> References: <5006A278.7000205@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1342633670 3794 80.91.229.3 (18 Jul 2012 17:47:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 18 Jul 2012 17:47:50 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 18 19:47:50 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SrYLi-0003Xh-Pc for ged-emacs-devel@m.gmane.org; Wed, 18 Jul 2012 19:47:46 +0200 Original-Received: from localhost ([::1]:54507 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrYLi-0004pL-52 for ged-emacs-devel@m.gmane.org; Wed, 18 Jul 2012 13:47:46 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37893) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrYLf-0004oz-0s for emacs-devel@gnu.org; Wed, 18 Jul 2012 13:47:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrYLd-0006RB-Ob for emacs-devel@gnu.org; Wed, 18 Jul 2012 13:47:42 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:32942) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrYLd-0006Qt-GO for emacs-devel@gnu.org; Wed, 18 Jul 2012 13:47:41 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0M7D00K00AMOIF00@a-mtaout21.012.net.il> for emacs-devel@gnu.org; Wed, 18 Jul 2012 20:47:35 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.210.75]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M7D00KBCARBC380@a-mtaout21.012.net.il>; Wed, 18 Jul 2012 20:47:35 +0300 (IDT) In-reply-to: <5006A278.7000205@yandex.ru> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:151738 Archived-At: > Date: Wed, 18 Jul 2012 15:48:08 +0400 > From: Dmitry Antipov > > 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=) at /home/dima/work/stuff/emacs/trunk/src/emacs.c:362 > #2 fatal_error_signal (sig=) at /home/dima/work/stuff/emacs/trunk/src/emacs.c:332 > #3 > #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=, file=, line=) > at /home/dima/work/stuff/emacs/trunk/src/alloc.c:6753 > #7 0x0000000000643ecb in delete_interval (i=) 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);