From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.bugs Subject: bug#10164: 24.0.91; Instant crash enabling linum-mode Date: Wed, 30 Nov 2011 10:51:01 -0500 Message-ID: References: <4ED58F60.4000604@code-affinity.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1322668334 9620 80.91.229.12 (30 Nov 2011 15:52:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 30 Nov 2011 15:52:14 +0000 (UTC) Cc: 10164@debbugs.gnu.org, tim.crews@code-affinity.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 30 16:52:10 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 1RVmS6-0002e2-84 for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 Nov 2011 16:52:06 +0100 Original-Received: from localhost ([::1]:50924 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVmS5-0001kP-SB for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 Nov 2011 10:52:05 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:57782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVmS2-0001js-Mi for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2011 10:52:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RVmRy-0000y8-FA for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2011 10:52:02 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46049) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVmRy-0000y4-Df for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2011 10:51:58 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RVmS1-0002oR-Mp for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2011 10:52:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dan Nicolaescu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Nov 2011 15:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10164 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10164-submit@debbugs.gnu.org id=B10164.132266826910742 (code B ref 10164); Wed, 30 Nov 2011 15:52:01 +0000 Original-Received: (at 10164) by debbugs.gnu.org; 30 Nov 2011 15:51:09 +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 1RVmRB-0002nB-2i for submit@debbugs.gnu.org; Wed, 30 Nov 2011 10:51:09 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVmR8-0002n3-97 for 10164@debbugs.gnu.org; Wed, 30 Nov 2011 10:51:07 -0500 Original-Received: from dann by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RVmR3-0004c1-Nj; Wed, 30 Nov 2011 10:51:01 -0500 In-Reply-To: (Eli Zaretskii's message of "Wed, 30 Nov 2011 08:54:41 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 30 Nov 2011 10:52:01 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:54487 Archived-At: Eli Zaretskii writes: >> From: Dan Nicolaescu >> Cc: Tim Crews , 10164@debbugs.gnu.org >> Date: Wed, 30 Nov 2011 07:52:40 -0500 >> >> Eli Zaretskii writes: >> >> >> Date: Tue, 29 Nov 2011 19:05:20 -0700 >> >> From: Tim Crews >> >> >> >> Start Emacs with runemacs -Q --no-init-file >> >> C-x C-f foo.txt >> >> M-x linum-mode >> >> (Emacs doesn't crash yet) >> >> Type anything. Emacs instantly crashes. >> > >> > Arrgh! This is GCC 4.6.x "as-is" code reordering in action. Emacs >> > crashes here: >> > >> > xassert (!row->enabled_p >> > || row->mode_line_p >> > || verify_row_hash (row)); >> > >> > Evidently, it calls verify_row_hash before it tests row->mode_line_p. >> >> Are you sure? > > How else can I explain this display from GDB: Compiler bug? > (gdb) prow > y=0 x=0 pwid=673 a+d=12+4=16 phys=12+4=16 vis=16 > used=(LMargin=0,Text=84,RMargin=0) Hash=263825844 > start=0 end=0 ENA MODEL > > ? MODEL says that this row has its mode_line_p flag set. > > Just to be sure, I ran the recipe again under GDB, setting a > breakpoint inside verify_row_hash thusly: > > (gdb) break verify_row_hash if row->mode_line_p != 0 > > and sure enough, it breaks as soon as I turn on linum-mode, with ROW > that shows the glyphs in the mode line. > >> Without interprocedural analysis the compiler cannot know >> that `verify_row_hash' does not alter row->enabled_p, so it cannot >> change the evaluation order. > > I don't know. Maybe GCC does perform such an analysis. Or maybe it It can't by default, `row_hash' is in a different file, so it's not available when compiling dispnew.c. > decides that the result of this comparison in verify_row_hash: > > row->hash == row_hash (row) > > will not change even if row_hash does modify its argument ROW. Or > maybe it's a bug in GCC.