From debbugs-submit-bounces@debbugs.gnu.org Wed May 21 05:57:53 2014 Received: (at submit) by debbugs.gnu.org; 21 May 2014 09:57:53 +0000 Received: from localhost ([127.0.0.1]:54981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wn3HU-0002qI-5X for submit@debbugs.gnu.org; Wed, 21 May 2014 05:57:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39836) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wn3HR-0002px-EX for submit@debbugs.gnu.org; Wed, 21 May 2014 05:57:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wn3HF-0002Y2-P0 for submit@debbugs.gnu.org; Wed, 21 May 2014 05:57:43 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52541) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wn3HF-0002Xy-Lo for submit@debbugs.gnu.org; Wed, 21 May 2014 05:57:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41522) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wn3HA-0006i9-0m for bug-gnu-emacs@gnu.org; Wed, 21 May 2014 05:57:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wn3H4-0002UC-Dv for bug-gnu-emacs@gnu.org; Wed, 21 May 2014 05:57:31 -0400 Received: from mxin.ulb.ac.be ([164.15.128.112]:5373) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wn3H4-0002QH-8r for bug-gnu-emacs@gnu.org; Wed, 21 May 2014 05:57:26 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsIABJ3fFOkD4Xn/2dsb2JhbABZg1eqNQEFBgWCXgFWgwOVG3SDPSQ0AYkMARQNoGmQZ5xxAYcShVWCAItABI89ijGBPYUXhEGID4M6Ow Received: from pno-math-231.ulb.ac.be (HELO LDLC-portable) ([164.15.133.231]) by smtp.ulb.ac.be with ESMTP; 21 May 2014 11:57:20 +0200 From: Nicolas Richard To: bug-gnu-emacs@gnu.org Subject: 24.3.91; SIGSEGV due to move_it_in_display_line_to Date: Wed, 21 May 2014 11:57:18 +0200 Message-ID: <87sio31mkh.fsf@yahoo.fr> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hello, This is a crash using csv-mode.el which is available from elpa. Here's how I reproduce (assuming csv-mode is installed) : $ emacs -Q -f package-initialize ~/tmp/test.csv At this point the file visiting buffer is in csv-mode. I then hit C-c C-a to align fields, then C-v a few times, M-v a few more times, and I promptly get a crash. The file test.csv weighs 11k, so I make it available online at http://pastie.org/pastes/9195319/text The crash seems to not happen if the frame is too big (i.e. when I maximize the frame in gnome before testing), but it happens using -nw. Here's the gdb backtrace : Starting program: /mnt/gentoo-home/youngfrog/sourcetrees/emacs-git/src/emacs -Q -f package-initialize ~/tmp/test.csv [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1". [New Thread 0xb611ab40 (LWP 19541)] [New Thread 0xb558cb40 (LWP 19542)] [New Thread 0xb4bffb40 (LWP 19543)] Program received signal SIGSEGV, Segmentation fault. move_it_in_display_line_to (it=it@entry=0xbfffe038, to_charpos=to_charpos@entry=1980, to_x=to_x@entry=-1, op=op@entry=MOVE_TO_POS) at xdisp.c:8401 8401 { #0 move_it_in_display_line_to (it=it@entry=0xbfffe038, to_charpos=to_charpos@entry=1980, to_x=to_x@entry=-1, op=op@entry=MOVE_TO_POS) at xdisp.c:8401 #1 0x0807ca89 in move_it_in_display_line_to (it=it@entry=0xbfffe038, to_charpos=to_charpos@entry=1980, to_x=to_x@entry=-1, op=op@entry=MOVE_TO_POS) at xdisp.c:8896 [snip the duplicate lines] #940 0x0807ca89 in move_it_in_display_line_to (it=it@entry=0xbfffe038, to_charpos=to_charpos@entry=1980, to_x=to_x@entry=-1, op=op@entry=MOVE_TO_POS) at xdisp.c:8896 #941 0x0807ca89 in move_it_in_display_line_to (it=it@entry=0xbfffe038, to_charpos=to_charpos@entry=1, to_x=to_x@entry=-1, op=op@entry=MOVE_TO_POS) at xdisp.c:8896 #942 0x08083276 in move_it_to (it=it@entry=0xbfffe038, to_charpos=1, to_x=to_x@entry=-1, to_y=to_y@entry=-1, to_vpos=to_vpos@entry=-1, op=op@entry=8) at xdisp.c:9156 #943 0x080a9e6e in window_scroll_pixel_based (window=window@entry=141492053, n=n@entry=1, whole=whole@entry=true, noerror=noerror@entry=0) at window.c:5119 #944 0x080adacd in window_scroll (window=141492053, n=, n@entry=1, whole=whole@entry=true, noerror=noerror@entry=0) at window.c:4839 #945 0x080adde8 in scroll_command (n=n@entry=138869698, direction=direction@entry=1) at window.c:5390 #946 0x080ade01 in Fscroll_up (arg=138869698) at window.c:5411 #947 0x0818bcf0 in Ffuncall (nargs=2, args=0xbfffe9f4) at eval.c:2815 #948 0x081be81b in exec_byte_code (bytestr=1980, vector=1980, maxdepth=-1073747472, args_template=138869698, nargs=nargs@entry=0, args=0x2) at bytecode.c:916 #949 0x0818b78d in funcall_lambda (fun=136952765, nargs=nargs@entry=1, arg_vector=arg_vector@entry=0xbfffebc4) at eval.c:3049 #950 0x0818bac3 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0xbfffebc0) at eval.c:2876 #951 0x08188271 in Fcall_interactively (function=139030170, record_flag=138869698, keys=138878541) at callint.c:836 #952 0x0818bcc9 in Ffuncall (nargs=4, args=0xbfffed0c) at eval.c:2822 #953 0x081be81b in exec_byte_code (bytestr=1980, vector=1980, maxdepth=-1073746692, args_template=args_template@entry=4100, nargs=nargs@entry=1, args=0x4) at bytecode.c:916 #954 0x0818b80e in funcall_lambda (fun=137226917, nargs=nargs@entry=1, arg_vector=arg_vector@entry=0xbfffeeac) at eval.c:2983 #955 0x0818bac3 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0xbfffeea8) at eval.c:2876 #956 0x0818be57 in call1 (fn=138896218, arg1=139030170) at eval.c:2614 #957 0x0812b3d7 in command_loop_1 () at keyboard.c:1559 #958 0x0818a283 in internal_condition_case (bfun=bfun@entry=0x812b0b0 , handlers=138902842, hfun=hfun@entry=0x8122970 ) at eval.c:1354 #959 0x0811e3e5 in command_loop_2 (ignore=138869698) at keyboard.c:1177 #960 0x0818a1b3 in internal_catch (tag=138900890, func=func@entry=0x811e3c0 , arg=138869698) at eval.c:1118 #961 0x081225e2 in command_loop () at keyboard.c:1156 #962 recursive_edit_1 () at keyboard.c:777 #963 0x081228c1 in Frecursive_edit () at keyboard.c:848 #964 0x08058038 in main (argc=, argv=0xbffff154) at emacs.c:1646 Cannot access memory at address 0xbf7ff88f Kill the program being debugged? (y or n) quit In GNU Emacs 24.3.91.1 (i686-pc-linux-gnu, GTK+ Version 2.24.20) of 2014-05-13 on LDLC-portable Windowing system distributor `The X.Org Foundation', version 11.0.11406000 System Description: Ubuntu 13.10 Important settings: value of $LANG: fr_BE.UTF-8 locale-coding-system: utf-8-unix -- Nico. From debbugs-submit-bounces@debbugs.gnu.org Wed May 21 11:09:34 2014 Received: (at 17539) by debbugs.gnu.org; 21 May 2014 15:09:34 +0000 Received: from localhost ([127.0.0.1]:55463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wn895-0005S5-3C for submit@debbugs.gnu.org; Wed, 21 May 2014 11:09:34 -0400 Received: from mtaout21.012.net.il ([80.179.55.169]:44754) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wn88z-0005RZ-60 for 17539@debbugs.gnu.org; Wed, 21 May 2014 11:09:29 -0400 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0N5X00G00IZ5E600@a-mtaout21.012.net.il> for 17539@debbugs.gnu.org; Wed, 21 May 2014 18:09:19 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N5X00FRRJFIWXA0@a-mtaout21.012.net.il>; Wed, 21 May 2014 18:09:18 +0300 (IDT) Date: Wed, 21 May 2014 18:09:29 +0300 From: Eli Zaretskii Subject: Re: bug#17539: 24.3.91; SIGSEGV due to move_it_in_display_line_to In-reply-to: <87sio31mkh.fsf@yahoo.fr> X-012-Sender: halo1@inter.net.il To: Nicolas Richard Message-id: <83k39fnp7a.fsf@gnu.org> References: <87sio31mkh.fsf@yahoo.fr> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 17539 Cc: 17539@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Nicolas Richard > Date: Wed, 21 May 2014 11:57:18 +0200 > > $ emacs -Q -f package-initialize ~/tmp/test.csv > > At this point the file visiting buffer is in csv-mode. > > I then hit C-c C-a to align fields, then C-v a few times, M-v a few more > times, and I promptly get a crash. > > The file test.csv weighs 11k, so I make it available online at > http://pastie.org/pastes/9195319/text > > The crash seems to not happen if the frame is too big (i.e. when I > maximize the frame in gnome before testing), but it happens using -nw. > > Here's the gdb backtrace : > > Starting program: /mnt/gentoo-home/youngfrog/sourcetrees/emacs-git/src/emacs -Q -f package-initialize ~/tmp/test.csv > [Thread debugging using libthread_db enabled] > Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1". > [New Thread 0xb611ab40 (LWP 19541)] > [New Thread 0xb558cb40 (LWP 19542)] > [New Thread 0xb4bffb40 (LWP 19543)] > > Program received signal SIGSEGV, Segmentation fault. > move_it_in_display_line_to (it=it@entry=0xbfffe038, to_charpos=to_charpos@entry=1980, to_x=to_x@entry=-1, op=op@entry=MOVE_TO_POS) at xdisp.c:8401 > 8401 { > > #0 move_it_in_display_line_to (it=it@entry=0xbfffe038, to_charpos=to_charpos@entry=1980, to_x=to_x@entry=-1, op=op@entry=MOVE_TO_POS) at xdisp.c:8401 > #1 0x0807ca89 in move_it_in_display_line_to (it=it@entry=0xbfffe038, to_charpos=to_charpos@entry=1980, to_x=to_x@entry=-1, op=op@entry=MOVE_TO_POS) at xdisp.c:8896 > [snip the duplicate lines] > #940 0x0807ca89 in move_it_in_display_line_to (it=it@entry=0xbfffe038, to_charpos=to_charpos@entry=1980, to_x=to_x@entry=-1, op=op@entry=MOVE_TO_POS) at xdisp.c:8896 Thanks, I think I fixed that (emacs-24 branch, revision 117137). The patch is below if you want to try that. === modified file 'src/ChangeLog' --- src/ChangeLog 2014-05-20 16:28:39 +0000 +++ src/ChangeLog 2014-05-21 15:03:18 +0000 @@ -1,3 +1,9 @@ +2014-05-21 Eli Zaretskii + + * xdisp.c (move_it_in_display_line_to): Avoid infinite recursion: + when closest_pos is identical to to_charpos, don't recurse, since + we already tried that, and failed. (Bug#17539) + 2014-05-20 Eli Zaretskii * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: If we are === modified file 'src/xdisp.c' --- src/xdisp.c 2014-04-18 08:35:09 +0000 +++ src/xdisp.c 2014-05-21 15:03:18 +0000 @@ -8812,8 +8812,11 @@ move_it_in_display_line_to (struct it *i if (closest_pos < ZV) { RESTORE_IT (it, &ppos_it, ppos_data); - move_it_in_display_line_to (it, closest_pos, -1, - MOVE_TO_POS); + /* Don't recurse if closest_pos is equal to + to_charpos, since we have just tried that. */ + if (closest_pos != to_charpos) + move_it_in_display_line_to (it, closest_pos, -1, + MOVE_TO_POS); result = MOVE_POS_MATCH_OR_ZV; } else @@ -8874,8 +8877,9 @@ move_it_in_display_line_to (struct it *i && !at_eob_p && closest_pos < ZV) { RESTORE_IT (it, &ppos_it, ppos_data); - move_it_in_display_line_to (it, closest_pos, -1, - MOVE_TO_POS); + if (closest_pos != to_charpos) + move_it_in_display_line_to (it, closest_pos, -1, + MOVE_TO_POS); } result = MOVE_POS_MATCH_OR_ZV; break; @@ -8893,7 +8897,9 @@ move_it_in_display_line_to (struct it *i if (closest_pos < ZV) { RESTORE_IT (it, &ppos_it, ppos_data); - move_it_in_display_line_to (it, closest_pos, -1, MOVE_TO_POS); + if (closest_pos != to_charpos) + move_it_in_display_line_to (it, closest_pos, -1, + MOVE_TO_POS); } result = MOVE_POS_MATCH_OR_ZV; break; From debbugs-submit-bounces@debbugs.gnu.org Wed May 21 11:35:17 2014 Received: (at control) by debbugs.gnu.org; 21 May 2014 15:35:17 +0000 Received: from localhost ([127.0.0.1]:55475 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wn8Xw-0007PY-JB for submit@debbugs.gnu.org; Wed, 21 May 2014 11:35:17 -0400 Received: from mtaout29.012.net.il ([80.179.55.185]:40286) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wn8Xq-0007Om-5O for control@debbugs.gnu.org; Wed, 21 May 2014 11:35:11 -0400 Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0N5X00300KE4ES00@mtaout29.012.net.il> for control@debbugs.gnu.org; Wed, 21 May 2014 18:35:44 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N5X00JGKKNJY7A0@mtaout29.012.net.il> for control@debbugs.gnu.org; Wed, 21 May 2014 18:35:44 +0300 (IDT) Date: Wed, 21 May 2014 18:35:09 +0300 From: Eli Zaretskii Subject: Re: Processed (with 1 errors): Re: bug#17526: 24.3.90; Crash in Cygwin-w32 build In-reply-to: X-012-Sender: halo1@inter.net.il To: control@debbugs.gnu.org (GNU bug tracker automated control server) Message-id: <83a9abno0i.fsf@gnu.org> References: <83mwebnpcq.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) severity 17526 important merge 17526 17539 thanks From debbugs-submit-bounces@debbugs.gnu.org Fri May 23 04:35:56 2014 Received: (at 17539-done) by debbugs.gnu.org; 23 May 2014 08:35:56 +0000 Received: from localhost ([127.0.0.1]:57272 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WnkxI-0001YV-07 for submit@debbugs.gnu.org; Fri, 23 May 2014 04:35:56 -0400 Received: from mxin.ulb.ac.be ([164.15.128.112]:59537) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WnkxF-0001YH-3O for 17539-done@debbugs.gnu.org; Fri, 23 May 2014 04:35:54 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmIFAJEHf1OkD4Xx/2dsb2JhbABZrhwCAQaDO5cCAYEedIImAQV5EAshJQ8BBEkTiCwBFLQJnEYBhn4XhVWCA4Z6B4RAAQOgRoRDiBCDOjs Received: from mathsrv4.ulb.ac.be (HELO geodiff-mac3.ulb.ac.be) ([164.15.133.241]) by smtp.ulb.ac.be with ESMTP; 23 May 2014 10:35:52 +0200 From: Nicolas Richard To: Eli Zaretskii Subject: Re: bug#17539: 24.3.91; SIGSEGV due to move_it_in_display_line_to References: <87sio31mkh.fsf@yahoo.fr> <83k39fnp7a.fsf@gnu.org> Date: Fri, 23 May 2014 10:36:56 +0200 In-Reply-To: <83k39fnp7a.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 21 May 2014 18:09:29 +0300") Message-ID: <87ioowevrr.fsf@geodiff-mac3.ulb.ac.be> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 17539-done Cc: Nicolas Richard , 17539-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) [cc: 17539-done] Eli Zaretskii writes: > Thanks, I think I fixed that (emacs-24 branch, revision 117137). The > patch is below if you want to try that. It seems to work fine, thanks ! -- Nico. From unknown Tue Jun 24 15:38:34 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 20 Jun 2014 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator