GNU bug report logs - #21651
25.0.50; [PATCH] Memory leak: auto_fontset_alist has keys that are modified externally by mistake

Previous Next

Package: emacs;

Reported by: Dima Kogan <dima <at> secretsauce.net>

Date: Thu, 8 Oct 2015 21:50:03 UTC

Severity: normal

Tags: patch

Found in version 25.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 21651 in the body.
You can then email your comments to 21651 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#21651; Package emacs. (Thu, 08 Oct 2015 21:50:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dima Kogan <dima <at> secretsauce.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 08 Oct 2015 21:50:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dima Kogan <dima <at> secretsauce.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.50;
 [PATCH] Memory leak: auto_fontset_alist has keys that are modified
 externally by mistake
Date: Thu, 08 Oct 2015 14:49:11 -0700
[Message part 1 (text/plain, inline)]
This issue was discussed on the mailing list with the thread starting
here:

https://lists.gnu.org/archive/html/emacs-devel/2015-10/msg00550.html

A patch was proposed here:

https://lists.gnu.org/archive/html/emacs-devel/2015-10/msg00292.html

and is copied here as an attachment.

[0001-copy_font_spec-now-makes-a-deeper-copy-of-its-input.patch (text/x-diff, inline)]
From: Dima Kogan <dima <at> secretsauce.net>
Date: Mon, 5 Oct 2015 11:21:12 -0700
Subject: (copy_font_spec) now makes a deeper copy of its input

---
 src/font.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/font.c b/src/font.c
index a52a653..0b2999e 100644
--- a/src/font.c
+++ b/src/font.c
@@ -3981,7 +3981,12 @@ 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);
+      {
+        *pcdr = Fcons (Fcons( XCAR (XCAR (tail)),
+                              XCDR (XCAR (tail))),
+                       Qnil);
+        pcdr = xcdr_addr (*pcdr);
+      }
 
   XSETFONT (new_spec, spec);
   return new_spec;

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Tue, 20 Oct 2015 15:15:02 GMT) Full text and rfc822 format available.

Notification sent to Dima Kogan <dima <at> secretsauce.net>:
bug acknowledged by developer. (Tue, 20 Oct 2015 15:15:03 GMT) Full text and rfc822 format available.

Message #10 received at 21651-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dima Kogan <dima <at> secretsauce.net>
Cc: 21651-done <at> debbugs.gnu.org
Subject: Re: bug#21651: 25.0.50;
 [PATCH] Memory leak: auto_fontset_alist has keys that are
 modified	externally by mistake
Date: Tue, 20 Oct 2015 18:14:08 +0300
> From: Dima Kogan <dima <at> secretsauce.net>
> Date: Thu, 08 Oct 2015 14:49:11 -0700
> 
> This issue was discussed on the mailing list with the thread starting
> here:
> 
> https://lists.gnu.org/archive/html/emacs-devel/2015-10/msg00550.html
> 
> A patch was proposed here:
> 
> https://lists.gnu.org/archive/html/emacs-devel/2015-10/msg00292.html
> 
> and is copied here as an attachment.

Thanks, pushed.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 18 Nov 2015 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 218 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.