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#15575: 24.3.50; New tty menus crash Emacs Date: Thu, 10 Oct 2013 22:36:54 +0300 Message-ID: <83pprcq5nt.fsf@gnu.org> References: <7A5C065F-4E90-4846-80EE-650AF314DCB2@swipnet.se> <83a9iiqr49.fsf@gnu.org> <5D661800-C7B5-495B-BF9D-F2E1F16C9B93@swipnet.se> <834n8qqnfx.fsf@gnu.org> <97F9A2CA-8E08-4867-93C3-5BAE8DF80D72@swipnet.se> <83txgpp0f1.fsf@gnu.org> <5AFF19E5-0778-425A-AF0C-0C027DEFB3D6@swipnet.se> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT X-Trace: ger.gmane.org 1381434730 26095 80.91.229.3 (10 Oct 2013 19:52:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Oct 2013 19:52:10 +0000 (UTC) Cc: 15575@debbugs.gnu.org To: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 10 21:52:13 2013 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 1VUMHM-0002D1-23 for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Oct 2013 21:52:12 +0200 Original-Received: from localhost ([::1]:50791 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUM4B-0001xZ-7N for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Oct 2013 15:38:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43522) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUM3j-0001hT-Ss for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2013 15:38:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VUM3e-0000mA-OL for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2013 15:38:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33155) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUM3e-0000m6-Ku for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2013 15:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VUM3e-0007aN-6P for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2013 15:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Oct 2013 19:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15575 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15575-submit@debbugs.gnu.org id=B15575.138143383929112 (code B ref 15575); Thu, 10 Oct 2013 19:38:02 +0000 Original-Received: (at 15575) by debbugs.gnu.org; 10 Oct 2013 19:37:19 +0000 Original-Received: from localhost ([127.0.0.1]:41447 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VUM2t-0007ZQ-Pr for submit@debbugs.gnu.org; Thu, 10 Oct 2013 15:37:19 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:36839) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VUM2p-0007ZC-6n for 15575@debbugs.gnu.org; Thu, 10 Oct 2013 15:37:15 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MUG00E00WX1I300@a-mtaout23.012.net.il> for 15575@debbugs.gnu.org; Thu, 10 Oct 2013 22:37:09 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MUG00EQ6X5XGU20@a-mtaout23.012.net.il>; Thu, 10 Oct 2013 22:37:09 +0300 (IDT) In-reply-to: <5AFF19E5-0778-425A-AF0C-0C027DEFB3D6@swipnet.se> 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:79159 Archived-At: > From: Jan Djärv > Date: Thu, 10 Oct 2013 19:35:30 +0200 > Cc: 15575@debbugs.gnu.org > > > /* Count how many glyphs to copy and copy the glyphs. */ > > for (area = LEFT_MARGIN_AREA; area < LAST_AREA; ++area) > > for (i = 0; i < from->used[area]; i++) > > to->glyphs[area][i] = from->glyphs[area][i]; <<<<<<<<<<<<<< > > > > It is the same place in the code, but not the same line in the file. > > > then please tell what is the value of 'area' and of 'i' at the point > > of the crash. > > > > On Fedora 19: > > (gdb) p area > $1 = 1 > (gdb) p i > $2 = 0 > (gdb) > > > Btw, did you compile with --enable-checking, i.e. were the 3 eassert > > statements at the beginning of deep_copy_glyph_row compiled into the > > program? > > No, I did not. I usually don't because the checkings more often than not trip on something that really isn't a bug. I've never caught a real error with it. > > This one triggers: > > #3 0x0000000000449d2b in deep_copy_glyph_row (from=, > to=0xce9e40) at /home/jhd/src/emacs/current/src/xdisp.c:20597 > 20597 eassert (to->used[0] == from->used[0]); > > (gdb) p to->used[0] > $1 = -15072 > > There is some memory corruption. If I press F11 twice and then F10, the crash does not happen. The menu appears but there are major redrawing problems, for example, going down in the menu does not work, it just scrolls the buffer instead until the menu disappears over the top, the buffer is not redrawn correctly when the menu goes away, nor is the menu bar. I did not test it much. > Could be another symptom of the memory corruption. Can you please try the latest trunk (after reverting the patch you applied on my request)? I made some changes that perhaps could fix this. (I don't understand why the code worked for others on Fedora; are you using a different development environment: compiler and/or library or something?)