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#9943: 24.0.91; Abort in check_glyph_memory Date: Sat, 05 Nov 2011 15:18:11 +0200 Message-ID: <83wrbek8rw.fsf@gnu.org> References: <4EB25C0C.3060806@gmx.at> <834nylm3c3.fsf@gnu.org> <4EB30229.7070105@cornell.edu> <831uton9zo.fsf@gnu.org> <0A21B7C4-DE31-4F1F-BE3A-9C12A0B206C5@swipnet.se> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: dough.gmane.org 1320499232 12383 80.91.229.12 (5 Nov 2011 13:20:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 5 Nov 2011 13:20:32 +0000 (UTC) Cc: 9943@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 Sat Nov 05 14:20:28 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 1RMgAd-0005Qq-5l for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 Nov 2011 14:20:27 +0100 Original-Received: from localhost ([::1]:43787 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMgAc-0004gN-M9 for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 Nov 2011 09:20:26 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:50571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMgAa-0004gF-8h for bug-gnu-emacs@gnu.org; Sat, 05 Nov 2011 09:20:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RMgAZ-00060R-01 for bug-gnu-emacs@gnu.org; Sat, 05 Nov 2011 09:20:24 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45326) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMgAY-00060M-R2 for bug-gnu-emacs@gnu.org; Sat, 05 Nov 2011 09:20:22 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RMgD8-00055o-EU for bug-gnu-emacs@gnu.org; Sat, 05 Nov 2011 09:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Nov 2011 13:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9943 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 9943-submit@debbugs.gnu.org id=B9943.132049937619564 (code B ref 9943); Sat, 05 Nov 2011 13:23:02 +0000 Original-Received: (at 9943) by debbugs.gnu.org; 5 Nov 2011 13:22:56 +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 1RMgD2-00055V-6Q for submit@debbugs.gnu.org; Sat, 05 Nov 2011 09:22:56 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RMgCy-00055H-JL for 9943@debbugs.gnu.org; Sat, 05 Nov 2011 09:22:54 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LU600400V8QHB00@a-mtaout20.012.net.il> for 9943@debbugs.gnu.org; Sat, 05 Nov 2011 15:19:06 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.228.70.69]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LU600425VNQK100@a-mtaout20.012.net.il>; Sat, 05 Nov 2011 15:19:03 +0200 (IST) In-reply-to: <0A21B7C4-DE31-4F1F-BE3A-9C12A0B206C5@swipnet.se> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 05 Nov 2011 09:23:02 -0400 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:53545 Archived-At: > From: Jan Dj=E4rv > Date: Sat, 5 Nov 2011 13:26:08 +0100 > Cc: Ken Brown , > 9943@debbugs.gnu.org >=20 > >> #0 abort () at emacs.c:386 > >> No locals. > >> #1 0x00404781 in check_glyph_memory () at dispnew.c:2370 > >> tail =3D 8775706 > >> frame =3D -2147299323 > >> #2 0x005149e8 in shut_down_emacs (sig=3D0, no_x=3D0, stuff=3D87= 75706) > >> at emacs.c:2102 > >=20 > > Thanks, I installed a fix. >=20 > I don't think it was quite correct. Thanks for double-checking it. > In x-create-frame terminal->reference_count gets incremented before= record_unwind_protect, but it is not decremented in case the unwind = protect function is called. Isn't it safer (from the POV of potentially destabilizing Emacs durin= g a pretest) to leave the increment where it was, and decrement it in t= he unwind protect function? > Also, in w32term.c, image_cache_refcount is assigned before init_fr= ame_faces is called, but in xterm.c, this is reversed. Indeed, turni= ng on GLYPH_DEBUG and recreating this bug causes an assert violation = in unwind_create_frame. An old bug, now fixed. Thanks. (Looks like not many people have GLYPH_DEBUG turned on these days.) > I don't know about w32, but on ns and X, accessing FRAME_IMAGE_CACH= E (f)->refcount before calling init_frame_faces causes a segmentation= violation, as FRAME_IMAGE_CACHE (f) is NULL. Even if it doesn't, it doesn't hurt to add the test in w32fns.c as well. > Also, there is a typo in the comment to unwind_create_frame, x_crea= te_top_frame should be ..._tip_frame. This may have been an old thin= g. >=20 > I fixed these issues on X and ns (I hope :-). Thanks. > > nsfns.m has a similar problem, but x-create-frame there doesn't h= ave > > an unwind-protect function to add a similar change. Can someone = test > > this recipe on a Mac? >=20 > The same bug was present there, but is fixed now. Thanks.