From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Segfault in vertical-motion Date: Tue, 06 Sep 2011 22:37:17 +0300 Message-ID: <838vq1jwcy.fsf@gnu.org> References: <4E661865.1040106@gmx.at> <83d3fdk4e3.fsf@gnu.org> <4E666AA6.3050802@gmx.at> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1315337867 328 80.91.229.12 (6 Sep 2011 19:37:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 6 Sep 2011 19:37:47 +0000 (UTC) Cc: emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 06 21:37:40 2011 Return-path: Envelope-to: ged-emacs-devel@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 1R11Sl-0004bu-Sx for ged-emacs-devel@m.gmane.org; Tue, 06 Sep 2011 21:37:40 +0200 Original-Received: from localhost ([::1]:55077 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R11Sl-0005Ek-5q for ged-emacs-devel@m.gmane.org; Tue, 06 Sep 2011 15:37:39 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:34091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R11Sf-0005EU-Vw for emacs-devel@gnu.org; Tue, 06 Sep 2011 15:37:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R11Sd-0005J6-Lx for emacs-devel@gnu.org; Tue, 06 Sep 2011 15:37:33 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:61264) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R11Sd-0005Ip-FW for emacs-devel@gnu.org; Tue, 06 Sep 2011 15:37:31 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LR400I008WOYT00@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Tue, 06 Sep 2011 22:37:12 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.229.83.44]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LR400IEH95Z7M90@a-mtaout20.012.net.il>; Tue, 06 Sep 2011 22:37:12 +0300 (IDT) In-reply-to: <4E666AA6.3050802@gmx.at> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.166 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:143788 Archived-At: > Date: Tue, 06 Sep 2011 20:47:02 +0200 > From: martin rudalics > CC: emacs-devel@gnu.org > > > What is it->method at this point? It should be between 0 and 5 (see > > enum it_method on dispextern.h). > > (gdb) p it->method > $1 = 50116946 Garbage (I think this is Qnil, btw, but it->method cannot be a Lisp object). And I see that this garbage goes all the way from Fvertical_motion, as your original backtrace shows: #4 0x010c2108 in Fvertical_motion (lines=4, window=56154629) at indent.c:2099 it_start = 81 first_x = 0 it_overshoot_expected = 0 it = { window = 0, w = 0x2c, f = 0x35a0000, method = 50116946, <<<<<<<<<<<<<<<<<<<<<<<<<<<< So I think it would be good if you step through Fvertical_motion (without stepping into the function it calls) after setting a watchpoint on it.method, and see which call(s) change it. We can then take it from there. > > Also, what is it->current? > > (gdb) p it->current > $2 = { > pos = { > charpos = 10, > bytepos = 0 > }, Also garbage (bytepos cannot be zero, its minimum value is 1, and it certainly cannot be smaller than charpos). > I have to bisect my customizations first to know what's really > causing it. This will take some time :-( It may be a better idea to step through Fvertical_motion and see who garbles the iterator object. It could lead us to solution faster and more reliably, since you say the crash is 100% reproducible with your ~/.emacs.