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#18610: 24.4.50; Specific file causing emacs to segfault upon opening Date: Fri, 03 Oct 2014 11:14:05 +0300 Message-ID: <83egupin8y.fsf@gnu.org> References: <87eguqbk5m.fsf@gmail.com> <87iok2iio2.fsf@geodiff-mac3.ulb.ac.be> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1412324125 6265 80.91.229.3 (3 Oct 2014 08:15:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 3 Oct 2014 08:15:25 +0000 (UTC) Cc: 18610@debbugs.gnu.org, maden.ldm@gmail.com To: Nicolas Richard , Kenichi Handa Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 03 10:15:18 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1XZy1F-0005f9-2B for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Oct 2014 10:15:17 +0200 Original-Received: from localhost ([::1]:38467 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZy1E-0005fJ-LR for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Oct 2014 04:15:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36004) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZy16-0005dc-VG for bug-gnu-emacs@gnu.org; Fri, 03 Oct 2014 04:15:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XZy11-0001ni-Sj for bug-gnu-emacs@gnu.org; Fri, 03 Oct 2014 04:15:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39977) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZy11-0001nF-Q2 for bug-gnu-emacs@gnu.org; Fri, 03 Oct 2014 04:15:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XZy10-0000db-Sa for bug-gnu-emacs@gnu.org; Fri, 03 Oct 2014 04:15:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Oct 2014 08:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18610 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18610-submit@debbugs.gnu.org id=B18610.14123240502378 (code B ref 18610); Fri, 03 Oct 2014 08:15:02 +0000 Original-Received: (at 18610) by debbugs.gnu.org; 3 Oct 2014 08:14:10 +0000 Original-Received: from localhost ([127.0.0.1]:59774 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XZy0A-0000cH-5p for submit@debbugs.gnu.org; Fri, 03 Oct 2014 04:14:10 -0400 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:46366) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XZy06-0000c6-Dd for 18610@debbugs.gnu.org; Fri, 03 Oct 2014 04:14:08 -0400 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0NCU00L00ZY6O600@mtaout25.012.net.il> for 18610@debbugs.gnu.org; Fri, 03 Oct 2014 11:09:13 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCU00JTLZZDQ910@mtaout25.012.net.il>; Fri, 03 Oct 2014 11:09:13 +0300 (IDT) In-reply-to: <87iok2iio2.fsf@geodiff-mac3.ulb.ac.be> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:94082 Archived-At: > From: Nicolas Richard > Date: Thu, 02 Oct 2014 17:40:45 +0200 > Cc: 18610@debbugs.gnu.org > > maden.ldm@gmail.com writes: > > > 1. emacs -Q > > 2. M-x find-file /home/ldionmarcil/Documents/bugreportemacs/_mixins.scssc RET > > 3. Emacs segfault > > Here's an actual backtrace, but I only get the crash if I do something > else. e.g. end-of-buffer. Perhaps my screen is too small. Thanks. It is very easy to get a backtrace with a working installation of GDB, just by using the OP's recipe. Here's what I get: Program received signal SIGTRAP, Trace/breakpoint trap. 0x7c90120f in ntdll!DbgBreakPoint () from C:\WINDOWS\system32\ntdll.dll (gdb) bt #0 0x7c90120f in ntdll!DbgBreakPoint () from C:\WINDOWS\system32\ntdll.dll #1 0x0120161e in emacs_abort () at w32fns.c:8491 #2 0x010d48f3 in bidi_get_type (ch=4195643, override=NEUTRAL_DIR) at bidi.c:289 #3 0x010d8540 in bidi_resolve_weak (bidi_it=0x82d680) at bidi.c:2030 #4 0x010d8742 in bidi_resolve_neutral (bidi_it=0x82d680) at bidi.c:2120 #5 0x010d8b18 in bidi_type_of_next_char (bidi_it=0x82d680) at bidi.c:2291 #6 0x010d8e4a in bidi_level_of_next_char (bidi_it=0x82d680) at bidi.c:2404 #7 0x010d931f in bidi_move_to_visually_next (bidi_it=0x82d680) at bidi.c:2614 #8 0x01036b7f in set_iterator_to_next (it=0x82d0cc, reseat_p=1) at xdisp.c:7417 #9 0x0105eecd in display_line (it=0x82d0cc) at xdisp.c:20617 #10 0x010517e4 in try_window (window=61647613, pos=..., flags=0) at xdisp.c:16972 #11 0x0104e1d2 in redisplay_window (window=61647613, just_this_one_p=true) at xdisp.c:16223 #12 0x01047eb1 in redisplay_window_1 (window=61647613) at xdisp.c:14356 #13 0x01181fba in internal_condition_case_1 ( bfun=0x1047e7b , arg=61647613, handlers=58275094, hfun=0x1047e1a ) at eval.c:1372 #14 0x01047281 in redisplay_internal () at xdisp.c:14002 #15 0x01044eaf in redisplay () at xdisp.c:13207 #16 0x010fad1c in read_char (commandflag=1, map=62245526, prev_event=58292258, used_mouse_menu=0x82f7c3, end_time=0x0) at keyboard.c:2570 #17 0x011080d9 in read_key_sequence (keybuf=0x82f8e0, bufsize=30, prompt=58292258, dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at keyboard.c:9088 #18 0x010f884b in command_loop_1 () at keyboard.c:1452 #19 0x01181ea7 in internal_condition_case (bfun=0x10f84ce , handlers=58343778, hfun=0x10f7d33 ) at eval.c:1348 #20 0x010f8183 in command_loop_2 (ignore=58292258) at keyboard.c:1177 #21 0x01181457 in internal_catch (tag=58339138, func=0x10f815f , arg=58292258) at eval.c:1112 #22 0x010f8139 in command_loop () at keyboard.c:1156 #23 0x010f78d0 in recursive_edit_1 () at keyboard.c:777 #24 0x010f7a8c in Frecursive_edit () at keyboard.c:848 #25 0x010f5ca7 in main (argc=2, argv=0xa427e8) at emacs.c:1646 Lisp Backtrace: "redisplay_internal (C function)" (0x1542e9c) (gdb) up #1 0x0120161e in emacs_abort () at w32fns.c:8491 8491 DebugBreak (); (gdb) up #2 0x010d48f3 in bidi_get_type (ch=4195643, override=NEUTRAL_DIR) at bidi.c:289 289 emacs_abort (); (gdb) up #3 0x010d8540 in bidi_resolve_weak (bidi_it=0x82d680) at bidi.c:2030 2030 type_of_next = bidi_get_type (next_char, override); (gdb) p next_char $1 = 4195643 (gdb) p/x next_char $2 = 0x40053b (gdb) p bidi_it->charpos $3 = 2672 As you see, at character position 2673 we get an invalid character codepoint 0x40053b, which is greater than MAX_CHAR. So bidi.c rightfully refuses to play with such a codepoint. Preliminary diagnostics indicates that under some as yet unclear circumstances the raw byte \226 gets represented incorrectly in the buffer: the leading \300 byte of the 2-byte sequence is missing. Perhaps we have some subtle bug in the text-decoding functions, so I'm adding Handa-san to the addressees. This affects the emacs-24 branch as well, so is quite urgent. I'll continue looking into this.