From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#5858: 24.0.50; bidi aborts: "can't happen" happens Date: Thu, 08 Apr 2010 20:42:57 +0300 Message-ID: <83d3y9263i.fsf@gnu.org> References: NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1270749577 7703 80.91.229.12 (8 Apr 2010 17:59:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 8 Apr 2010 17:59:37 +0000 (UTC) Cc: 5858-done@debbugs.gnu.org To: Ari Roponen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 08 19:59:34 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nzw0r-0006SQ-2i for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Apr 2010 19:59:33 +0200 Original-Received: from localhost ([127.0.0.1]:36985 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nzw0q-00033J-MG for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Apr 2010 13:59:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nzw0D-0002Zt-K2 for bug-gnu-emacs@gnu.org; Thu, 08 Apr 2010 13:58:53 -0400 Original-Received: from [140.186.70.92] (port=54262 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nzw09-0002Wy-KK for bug-gnu-emacs@gnu.org; Thu, 08 Apr 2010 13:58:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nzw03-0004JS-Av for bug-gnu-emacs@gnu.org; Thu, 08 Apr 2010 13:58:49 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38253) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nzw00-0004Ii-2f for bug-gnu-emacs@gnu.org; Thu, 08 Apr 2010 13:58:42 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Nzvlq-0005yw-74 for bug-gnu-emacs@gnu.org; Thu, 08 Apr 2010 13:44:02 -0400 Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Apr 2010 17:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org Mail-Followup-To: 5858@debbugs.gnu.org, Eli Zaretskii X-GNU-PR-Message: cc-closed 5858 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 5858-done@debbugs.gnu.org id=D5858.127074863022985 (code D ref 5858); Thu, 08 Apr 2010 17:44:01 +0000 Original-Received: (at 5858-done) by debbugs.gnu.org; 8 Apr 2010 17:43:50 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nzvld-0005yg-UC for submit@debbugs.gnu.org; Thu, 08 Apr 2010 13:43:50 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nzvlc-0005ya-02 for 5858-done@debbugs.gnu.org; Thu, 08 Apr 2010 13:43:49 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0L0K00F00JUEHB00@a-mtaout23.012.net.il> for 5858-done@debbugs.gnu.org; Thu, 08 Apr 2010 20:42:57 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([77.124.92.42]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L0K00ETKJVKTF20@a-mtaout23.012.net.il>; Thu, 08 Apr 2010 20:42:57 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 08 Apr 2010 13:44:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:36095 Archived-At: > From: Ari Roponen > Date: Thu, 08 Apr 2010 12:03:55 +0300 > Cc: > > the following code crashes emacs by making code in bidi.c call > abort(): > > (let ((bidi-display-reordering t)) > (insert #x650 #x650) ; ARABIC KASRA > (redisplay)) Heh, a brain-fart from 9 years ago that came back to haunt me... > The place that calls abort() is in bidi_resolve_neutral(): > > #0 abort () at emacs.c:430 > #1 0x0000000000490abe in bidi_resolve_neutral (bidi_it=0x7fffffff9000) > at bidi.c:1577 > #2 0x000000000049119a in bidi_level_of_next_char (bidi_it=0x7fffffff9000) > at bidi.c:1713 > ... > > (gdb) up > #1 0x0000000000490abe in bidi_resolve_neutral (bidi_it=0x7fffffff9000) > at bidi.c:1577 > 1577 abort (); /* can't happen: BNs are skipped */ > (gdb) l > 1572 next_type = STRONG_R; > 1573 saved_it.next_for_neutral.type = STRONG_R; > 1574 break; > 1575 case WEAK_BN: > 1576 if (!bidi_explicit_dir_char (bidi_it->ch)) > 1577 abort (); /* can't happen: BNs are skipped */ > 1578 /* FALLTHROUGH */ > 1579 case NEUTRAL_B: > 1580 /* Marched all the way to the end of this level run. > 1581 We need to use the eor type, whose information is Yours is an optimized build, right? Because, in an unoptimized build, it's a different call to `abort' that is triggered: #1 0x011a3931 in bidi_resolve_neutral (bidi_it=0x82d2f8) at bidi.c:1600 1600 abort (); (gdb) l 1595 bidi_copy_it (bidi_it, &saved_it); 1596 return bidi_it->type; 1597 } 1598 break; 1599 default: 1600 abort (); <<<<<<<<<<<<<<<<< 1601 } 1602 type = bidi_resolve_neutral_1 (saved_it.prev_for_neutral.type, 1603 next_type, current_level); 1604 saved_it.type = type; Anyway, I think I fixed it (revno 99851); please try again after updating your tree. If it still doesn't work, please re-open this bug. Thanks for reporting this.