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: Debugging emacs memory management Date: Mon, 05 Oct 2015 13:47:08 +0300 Message-ID: <83lhbhzj6b.fsf@gnu.org> References: <87zj8l3r32.fsf@secretsauce.net> <87vbbbxz2e.fsf@secretsauce.net> <55F998C8.4080203@cs.ucla.edu> <87vbb492ea.fsf@secretsauce.net> <83twqonub8.fsf@gnu.org> <87oagw885o.fsf@secretsauce.net> <837fnknlbm.fsf@gnu.org> <834mionkdg.fsf@gnu.org> <87fv1p232b.fsf@secretsauce.net> <83wpv1zr4q.fsf@gnu.org> <87egh9205z.fsf@secretsauce.net> <83r3l9zowx.fsf@gnu.org> <87d1wt1xe0.fsf@secretsauce.net> <87bncd1w88.fsf@secretsauce.net> <87a8rx1vmf.fsf@secretsauce.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1444042075 8068 80.91.229.3 (5 Oct 2015 10:47:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Oct 2015 10:47:55 +0000 (UTC) Cc: schwab@suse.de, eggert@cs.ucla.edu, emacs-devel@gnu.org To: Dima Kogan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 05 12:47:46 2015 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 1Zj3J2-00008J-6J for ged-emacs-devel@m.gmane.org; Mon, 05 Oct 2015 12:47:44 +0200 Original-Received: from localhost ([::1]:45234 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zj3J1-0004Da-8H for ged-emacs-devel@m.gmane.org; Mon, 05 Oct 2015 06:47:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40952) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zj3IY-0004AT-Os for emacs-devel@gnu.org; Mon, 05 Oct 2015 06:47:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zj3IV-0000kj-GO for emacs-devel@gnu.org; Mon, 05 Oct 2015 06:47:14 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:37730) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zj3IV-0000jd-8v for emacs-devel@gnu.org; Mon, 05 Oct 2015 06:47:11 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NVQ00C00TS9WF00@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Mon, 05 Oct 2015 13:47:09 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NVQ00C0ZTYLR550@a-mtaout20.012.net.il>; Mon, 05 Oct 2015 13:47:09 +0300 (IDT) In-reply-to: <87a8rx1vmf.fsf@secretsauce.net> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 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:190934 Archived-At: > From: Dima Kogan > Cc: Eli Zaretskii , eggert@cs.ucla.edu, emacs-devel@gnu.org > Date: Mon, 05 Oct 2015 03:02:16 -0700 > > Andreas Schwab writes: > > Dima Kogan writes: > > > >> diff --git a/src/font.c b/src/font.c > >> index 8e06532..ca872d0 100644 > >> --- a/src/font.c > >> +++ b/src/font.c > >> @@ -3981,7 +3981,15 @@ copy_font_spec (Lisp_Object font) > >> pcdr = spec->props + FONT_EXTRA_INDEX; > >> for (tail = AREF (font, FONT_EXTRA_INDEX); CONSP (tail); tail = XCDR (tail)) > >> if (!EQ (XCAR (XCAR (tail)), QCfont_entity)) > >> - *pcdr = Fcons (XCAR (tail), Qnil), pcdr = xcdr_addr (*pcdr); > >> + { > >> + if (CONSP (XCAR (tail))) > > > > This better be always true, otherwise XCAR (XCAR (tail)) would be a bug. > > It isn't. Without that check I was getting every time. > > *ERROR*: Wrong type argument: listp, "monospace-10" I think what Andreas meant was this: the old code used XCAR (XCAR (tail)) unconditionally, which seems to indicate that XCAR (tail) is always a cons cell, and your test should always yield true. > Surprised me too, and I haven't checked to see what was happening there. So maybe your code should include some check for QCfont_entity in the 'else' clause as well. Btw, isn't 12KB per frame still a lot? Thanks.