From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Johan =?UTF-8?Q?Bockg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#9495: 24.0.50; Segfault in try_cursor_movement Date: Wed, 14 Sep 2011 21:50:29 +0200 Message-ID: <87zki6sy2i.fsf@gnu.org> References: <877h5ctf72.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1316029901 31657 80.91.229.12 (14 Sep 2011 19:51:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 14 Sep 2011 19:51:41 +0000 (UTC) Cc: 9495@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 14 21:51:36 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R3vUc-0001Uw-JX for geb-bug-gnu-emacs@m.gmane.org; Wed, 14 Sep 2011 21:51:34 +0200 Original-Received: from localhost ([::1]:33725 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3vUc-0001Kr-3m for geb-bug-gnu-emacs@m.gmane.org; Wed, 14 Sep 2011 15:51:34 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:46179) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3vUW-0001Hq-U5 for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2011 15:51:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R3vUV-0006QJ-UR for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2011 15:51:28 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57981) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3vUV-0006QD-Ss for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2011 15:51:27 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1R3vYv-0001G9-OG; Wed, 14 Sep 2011 15:56:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Johan =?UTF-8?Q?Bockg=C3=A5rd?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Sep 2011 19:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9495 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9495-submit@debbugs.gnu.org id=B9495.13160301134781 (code B ref 9495); Wed, 14 Sep 2011 19:56:01 +0000 Original-Received: (at 9495) by debbugs.gnu.org; 14 Sep 2011 19:55:13 +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 1R3vY8-0001F4-LQ for submit@debbugs.gnu.org; Wed, 14 Sep 2011 15:55:12 -0400 Original-Received: from smtprelay-b12.telenor.se ([62.127.194.21]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3vY5-0001Ew-Vd for 9495@debbugs.gnu.org; Wed, 14 Sep 2011 15:55:11 -0400 Original-Received: from ipb1.telenor.se (ipb1.telenor.se [195.54.127.164]) by smtprelay-b12.telenor.se (Postfix) with ESMTP id 9A404E9B90 for <9495@debbugs.gnu.org>; Wed, 14 Sep 2011 21:50:34 +0200 (CEST) X-SMTPAUTH-B2: [bocjoh] X-SENDER-IP: [85.228.198.117] X-LISTENER: [smtp.bredband.net] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApplABMFcU5V5MZ1PGdsb2JhbABBhFWERp4sCwEBAQE3M4FTAQEEAR4FBC8jEAsUAQUCBSECAg8BBBgBDAoaE4d3AqNbkheBLIQxgREEnAyIWg X-IronPort-AV: E=Sophos;i="4.68,382,1312149600"; d="scan'208";a="219255369" Original-Received: from c-75c6e455.04-211-6c6b701.cust.bredbandsbolaget.se (HELO muon.localdomain) ([85.228.198.117]) by ipb1.telenor.se with ESMTP; 14 Sep 2011 21:50:32 +0200 Original-Received: by muon.localdomain (Postfix, from userid 1000) id B566B484478; Wed, 14 Sep 2011 21:50:30 +0200 (CEST) In-Reply-To: (Eli Zaretskii's message of "Wed, 14 Sep 2011 01:22:21 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 14 Sep 2011 15:56:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) 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:51161 Archived-At: Eli Zaretskii writes: >> From: Johan Bockg=C3=A5rd >> Date: Tue, 13 Sep 2011 21:28:17 +0200 >>=20 >>=20 >> Program terminated with signal 11, Segmentation fault. >> #0 0x00007f5bccbe6fe7 in kill () at ../sysdeps/unix/syscall-template.S:= 82 >> 82 ../sysdeps/unix/syscall-template.S: No such file or directory. >> in ../sysdeps/unix/syscall-template.S >> (gdb) bt >> #0 0x00007f5bccbe6fe7 in kill () at ../sysdeps/unix/syscall-template.S:= 82 >> #1 0x000000000056e889 in fatal_error_signal (sig=3D11) at emacs.c:358 >> #2 >> #3 0x0000000000465f3f in try_cursor_movement (window=3D20987605, startp= =3D..., >> scroll_step=3D0x7fff5e400758) at xdisp.c:14639 >>=20 >> xdisp.c:14639: (BUFFERP (g->object) && g->charpos =3D=3D PT) >>=20 >> g is not a valid glyph here. >>=20 >> (gdb) p MATRIX_ROW (w->current_matrix, w->cursor.vpos).used[TEXT_AREA] >> $3 =3D 80 >> (gdb) p w->cursor.hpos >> $4 =3D 80 > > Thanks. But what is the value of `rv' at that point? 1 >> 2011-09-13 Johan Bockg=C3=A5rd >>=20 >> * xdisp.c (try_cursor_movement): Check bounds of hpos. > > That will prevent your particular crash, but I'm not sure it's correct > in all cases (like R2L lines and other atrocities). Can you give a > recipe for reproducing this crash from "emacs -Q"? I'd like to > investigate a bit more. TIA. emacs -Q -eval '(setq line-move-visual nil truncate-lines t track-eol t)' C-u 100 x RET y At this point, in try_cursor_movement, point is in the "x" line, the window has not yet hscrolled, and the value of hpos is just after the last valid element in glyphs[TEXT_AREA]. (It only actually crashes some of the time, of course.)