From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel Subject: Subtle bug in intervals code Date: Wed, 18 Jul 2012 15:48:08 +0400 Message-ID: <5006A278.7000205@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1342611956 10630 80.91.229.3 (18 Jul 2012 11:45:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 18 Jul 2012 11:45:56 +0000 (UTC) To: Emacs development discussions Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 18 13:45:55 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 1SrShU-0000hz-5y for ged-emacs-devel@m.gmane.org; Wed, 18 Jul 2012 13:45:52 +0200 Original-Received: from localhost ([::1]:55866 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrShT-0001ys-EI for ged-emacs-devel@m.gmane.org; Wed, 18 Jul 2012 07:45:51 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51471) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrShR-0001yk-Av for emacs-devel@gnu.org; Wed, 18 Jul 2012 07:45:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrShP-0000uO-OA for emacs-devel@gnu.org; Wed, 18 Jul 2012 07:45:49 -0400 Original-Received: from forward10.mail.yandex.net ([77.88.61.49]:56198) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrShP-0000uI-76 for emacs-devel@gnu.org; Wed, 18 Jul 2012 07:45:47 -0400 Original-Received: from smtp7.mail.yandex.net (smtp7.mail.yandex.net [77.88.61.55]) by forward10.mail.yandex.net (Yandex) with ESMTP id 8E75510253AE for ; Wed, 18 Jul 2012 15:45:45 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1342611945; bh=cEgOLh6JTaufNqnLrAbZcice5JVi1DcNm5SbPXXYODc=; h=Message-ID:Date:From:MIME-Version:To:Subject:Content-Type: Content-Transfer-Encoding; b=HpLYtFGw7E5J/p6y39gQvFdbDB7oVHnN0Oiw2b8hsHOfLWmfKfeUlukKHr4xH2IXb VevRTLwTcwY4Pg0oWuErKoX9QOjLsZnzPZwjXkrEEqyT9vfctAxYUc1DHQ4dn2BbI2 wVtPqoTxzFlNpMOBqRcb72EleUTJnM4eEXbKtS1c= Original-Received: from smtp7.mail.yandex.net (localhost [127.0.0.1]) by smtp7.mail.yandex.net (Yandex) with ESMTP id 7BEE1158001C for ; Wed, 18 Jul 2012 15:45:45 +0400 (MSK) Original-Received: from 13.gprs.mts.ru (13.gprs.mts.ru [213.87.129.13]) by smtp7.mail.yandex.net (nwsmtp/Yandex) with ESMTP id jhgWBPMC-jigWYjse; Wed, 18 Jul 2012 15:45:44 +0400 X-Yandex-Rcpt-Suid: emacs-devel@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1342611945; bh=cEgOLh6JTaufNqnLrAbZcice5JVi1DcNm5SbPXXYODc=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:Subject: Content-Type:Content-Transfer-Encoding; b=ptpUO/xL5QmIQj2/cLJV9OzgH+SoVxMmv9PQxFiEe8pnQlAiO8MSZi7KlcpuTA7eu Z/RCZom8faBqiTMcoVGABfUczenIRvZZyofkxsH3nOec29tksfXjZsmrVbqbRX7F3P 9nosrzgRycpyklA5paY+FLQTfTq6W2IYhHSV3t+8= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 77.88.61.49 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:151730 Archived-At: 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 #8 0x00000000006452cc in merge_interval_left (i=) 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=, end=, properties=, object=) at /home/dima/work/stuff/emacs/trunk/src/textprop.c:1244 #11 0x00000000005e0379 in eval_sub (form=) 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