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#1448: 23.0.60; update to cvs emacs crash report Date: Fri, 28 Nov 2008 12:56:05 +0200 Message-ID: References: <81hc5s5t2y.fsf@blackmagic-design.com> Reply-To: Eli Zaretskii , 1448@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1227870833 13756 80.91.229.12 (28 Nov 2008 11:13:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Nov 2008 11:13:53 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, fengli@blackmagic-design.com To: Juanma Barranquero , 1448@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 28 12:14:57 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L61JC-0000tm-RD for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Nov 2008 12:14:52 +0100 Original-Received: from localhost ([127.0.0.1]:50719 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L61I2-0004vd-Pn for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Nov 2008 06:13:38 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L61Ev-0002CA-Bf for bug-gnu-emacs@gnu.org; Fri, 28 Nov 2008 06:10:25 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L61Et-0002A7-I9 for bug-gnu-emacs@gnu.org; Fri, 28 Nov 2008 06:10:23 -0500 Original-Received: from [199.232.76.173] (port=49955 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L61Et-00029I-9X for bug-gnu-emacs@gnu.org; Fri, 28 Nov 2008 06:10:23 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:45712) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L61Er-0001jF-T7 for bug-gnu-emacs@gnu.org; Fri, 28 Nov 2008 06:10:22 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mASBABNB025766; Fri, 28 Nov 2008 03:10:12 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mASB55m9023864; Fri, 28 Nov 2008 03:05:05 -0800 X-Loop: don@donarmstrong.com Resent-From: Eli Zaretskii Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs , don@donarmstrong.com Resent-Date: Fri, 28 Nov 2008 11:05:05 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1448 X-Emacs-PR-Package: emacs,w32 X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122786979921740 (code B ref -1); Fri, 28 Nov 2008 11:05:05 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 28 Nov 2008 10:56:39 +0000 Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mASAua67021725 for ; Fri, 28 Nov 2008 02:56:37 -0800 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L611X-00021c-U9 for bug-gnu-emacs@gnu.org; Fri, 28 Nov 2008 05:56:35 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L611S-0001yb-CS for bug-gnu-emacs@gnu.org; Fri, 28 Nov 2008 05:56:35 -0500 Original-Received: from [199.232.76.173] (port=35577 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L611R-0001yE-M4 for bug-gnu-emacs@gnu.org; Fri, 28 Nov 2008 05:56:29 -0500 Original-Received: from mtaout5.012.net.il ([84.95.2.13]:10691) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L611R-0008BQ-3X for bug-gnu-emacs@gnu.org; Fri, 28 Nov 2008 05:56:29 -0500 Original-Received: from conversion-daemon.i_mtaout5.012.net.il by i_mtaout5.012.net.il (HyperSendmail v2004.12) id <0KB100D00ID1FY00@i_mtaout5.012.net.il> for bug-gnu-emacs@gnu.org; Fri, 28 Nov 2008 12:58:04 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.127.156.55]) by i_mtaout5.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KB100A4UIGQDHA2@i_mtaout5.012.net.il>; Fri, 28 Nov 2008 12:58:03 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: Solaris 9.1 X-CrossAssassin-Score: 2 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Fri, 28 Nov 2008 06:10:23 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:22736 Archived-At: > Date: Fri, 28 Nov 2008 10:25:09 +0100 > From: "Juanma Barranquero" > Cc: 1448@emacsbugs.donarmstrong.com > > What you're seeing is bug#872 (also #1179). > > I originally thought it depended on > `display-unibyte-via-language-environment', but it is not so; I've > seen it (and suffered it) through several different incarnations. > > What they all have in common: > > - Using a "recent" MinGW GCC (4.2.1, 4.3.0-alpha, etc.) > - Compiling with optimization Now I understand why I cannot reproduce this: I never bothered to upgrade to GCC 4.x. > - Trying to display unibyte (or, perhaps, some composed characters, > I'm not sure) How does "C-h b" get to display unibyte or composed characters? > I've been trying to debug it, without success (it doesn't help that I > know very little about the glyph handling code). I'm not even sure > whether it is a compiler bug, or a bug in Emacs (it happens in code > that was undergoing changes quite recently). Is it a Heisenbug? i.e., does it disappear if you add printf's around the code that crashes or in its callers? If the bug stays put when code around it is modified, you could try debugging it by adding "if (something) abort ();" lines testing various conditions that are suspect of causing the crash. Some observations based on the traceback posted by Feng Li: > Program received signal SIGSEGV, Segmentation fault. > 0x0101fdd5 in fill_glyph_string (s=0x820000, face_id=27, start=, end=, overlaps=) at xdisp.c:19740 Line 19740 in xdisp.c is this: s->ybase += voffset; And "bt full" says this about `s': > s = (struct glyph_string *) 0x0 However, `s' is dereferenced many times in `fill_glyph_string' before it gets to line 19740, so I think GDB lies about the place where it crashed (because GCC optimizes code to the degree that any relation between the code and the source lines is lost). Therefore, the first thing to do is disassembly the vicinity of the crash locus (0x0101fdd5) and see which code, exactly, crashes, and why. Disassembly should establish (1) the source line that crashes, and (2) which C-level variable causes the crash. Note that `s' is allocated via `alloca' in BUILD_CHAR_GLYPH_STRINGS, which is called by BUILD_GLYPH_STRINGS, which in turn is called by `draw_glyphs' at line 20332 in frame #1: > #1 0x01040a0c in draw_glyphs (w=0x3439800, x=72, row=0x3345260, area=TEXT_AREA, start=0, end=30, hl=DRAW_NORMAL_TEXT, overlaps=0) at xdisp.c:20332 The original source line 20332 in xdisp.c looks like this: BUILD_GLYPH_STRINGS (i, end, head, tail, hl, x, last_x);