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: EXC_BAD_ACCESS on Mac Date: Mon, 17 Jun 2013 21:43:52 +0300 Message-ID: <83sj0gshlj.fsf@gnu.org> References: <20130617.123614.2140724077647508876.kazu@iij.ad.jp> <8361xcu6de.fsf@gnu.org> <20130618.031621.138397593356453484.kazu@iij.ad.jp> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1371494644 32362 80.91.229.3 (17 Jun 2013 18:44:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Jun 2013 18:44:04 +0000 (UTC) Cc: emacs-devel@gnu.org To: Kazu Yamamoto (=?iso-2022-jp?B?GyRCOzNLXE9CSScbKEI=?=) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 17 20:44:04 2013 Return-path: Envelope-to: ged-emacs-devel@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 1UoePL-0001qe-2G for ged-emacs-devel@m.gmane.org; Mon, 17 Jun 2013 20:44:03 +0200 Original-Received: from localhost ([::1]:36597 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UoePK-00023w-Kx for ged-emacs-devel@m.gmane.org; Mon, 17 Jun 2013 14:44:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36651) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UoePC-00022g-Ex for emacs-devel@gnu.org; Mon, 17 Jun 2013 14:44:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UoePA-0007Tg-7m for emacs-devel@gnu.org; Mon, 17 Jun 2013 14:43:54 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:59225) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UoeP9-0007T4-U3 for emacs-devel@gnu.org; Mon, 17 Jun 2013 14:43:52 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MOJ00400VO8HM00@a-mtaout21.012.net.il> for emacs-devel@gnu.org; Mon, 17 Jun 2013 21:43:50 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MOJ004EOW11BQ90@a-mtaout21.012.net.il>; Mon, 17 Jun 2013 21:43:50 +0300 (IDT) In-reply-to: <20130618.031621.138397593356453484.kazu@iij.ad.jp> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.169 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:160516 Archived-At: > Date: Tue, 18 Jun 2013 03:16:21 +0900 (JST) > From: Kazu Yamamoto (山本和彦) > > >> I'm using Emacs HEAD ("24.3.50.1") on Mac. It *often* crashes when I'm > >> reading e-mail messages with Mew. I took trace with gdb. The value of > >> "glyph" is 0x5bfe and this causes EXC_BAD_ACCESS. > > > > The value of 'glyph' is a pointer to a structure, so this value is > > meaningless. The contents of that structure might be interesting, > > though. > > I don't think so. I think the broken pointer value of 'glyph' causes > EXC_BAD_ACCESS. Note that EXC_BAD_ACCESS is a Mac specific error. > > In another catch, let's see what happens if we evaluate each value: > > Program received signal EXC_BAD_ACCESS, Could not access memory. > Reason: 13 at address: 0x0000000000000000 But it says that the address was zero. Where did that come from, if the problem is with 'glyph' and none of the other values is a null pointer? Anyway, if the problem is 'glyph', then it happens higher, here: static int fill_glyph_string (struct glyph_string *s, int face_id, int start, int end, int overlaps) { struct glyph *glyph, *last; int voffset; int glyph_not_available_p; eassert (s->f == XFRAME (s->w->frame)); eassert (s->nchars == 0); eassert (start >= 0 && end > start); s->for_overlaps = overlaps; glyph = s->row->glyphs[s->area] + start; last = s->row->glyphs[s->area] + end; voffset = glyph->voffset; s->padding_p = glyph->padding_p; glyph_not_available_p = glyph->glyph_not_available_p; while (glyph < last && glyph->type == CHAR_GLYPH && glyph->voffset == voffset /* Same face id implies same font, nowadays. */ && glyph->face_id == face_id && glyph->glyph_not_available_p == glyph_not_available_p) { int two_byte_p; s->face = get_glyph_face_and_encoding (s->f, glyph, s->char2b + s->nchars, &two_byte_p); And actually the values of start and end look either garbled or bogus due to optimizations: #1 0x000000010001b44d in fill_glyph_string (s=0x10c408758, face_id=1606399872, start=1606399888, end=1606399828, overlaps=677) at xdisp.c:22766 #2 0x000000010001bded in draw_glyphs (w=0x10c408758, x=8, row=0x7fff5fbfb790, area=1606399828, start=677, end=677, hl=DRAW_NORMAL_TEXT, overlaps=0) at xdisp.c:23384 So please look around and see what is going on in this glyph string.