From: Manuel Giraud <manuel@ledu-giraud.fr>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 58028@debbugs.gnu.org
Subject: bug#58028: 29.0.50; Ensures no leakage of glyph_matrix
Date: Sat, 24 Sep 2022 17:31:20 +0200 [thread overview]
Message-ID: <87zgeon60n.fsf@elite.giraud> (raw)
In-Reply-To: <83czblned0.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 24 Sep 2022 15:31:07 +0300")
[-- Attachment #1: Type: text/plain, Size: 117 bytes --]
So I've tested emacs -Q a bit (compiled with --enable-checking=all) with
the attached patch. I had no error so far.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Ensures-no-leakage-of-glyph_matrix.patch --]
[-- Type: text/x-patch, Size: 1031 bytes --]
From 332ea1a172568a31f8e2ad0dcd921727d30dad68 Mon Sep 17 00:00:00 2001
From: Manuel Giraud <manuel@ledu-giraud.fr>
Date: Fri, 23 Sep 2022 17:14:44 +0200
Subject: [PATCH] Ensures no leakage of glyph_matrix
; * src/dispnew.c (allocate_matrices_for_window_redisplay): Ensures no
leakage of glyph_matrix.
---
src/dispnew.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/dispnew.c b/src/dispnew.c
index b786f0f1ba..2568ba1086 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -1810,9 +1810,12 @@ allocate_matrices_for_window_redisplay (struct window *w)
if (w->desired_matrix == NULL)
{
w->desired_matrix = new_glyph_matrix (NULL);
- w->current_matrix = new_glyph_matrix (NULL);
+ eassert (w->current_matrix == NULL);
}
+ if (w->current_matrix == NULL)
+ w->current_matrix = new_glyph_matrix (NULL);
+
dim.width = required_matrix_width (w);
dim.height = required_matrix_height (w);
adjust_glyph_matrix (w, w->desired_matrix, 0, 0, dim);
--
2.37.3
[-- Attachment #3: Type: text/plain, Size: 18 bytes --]
--
Manuel Giraud
next prev parent reply other threads:[~2022-09-24 15:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-23 15:22 bug#58028: 29.0.50; Ensures no leakage of glyph_matrix Manuel Giraud
2022-09-23 15:49 ` Eli Zaretskii
2022-09-23 15:59 ` Manuel Giraud
2022-09-23 17:43 ` Eli Zaretskii
2022-09-23 20:43 ` Manuel Giraud
2022-09-24 0:26 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-24 5:46 ` Eli Zaretskii
2022-09-24 10:29 ` Manuel Giraud
2022-09-24 10:34 ` Lars Ingebrigtsen
2022-09-24 10:36 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-24 12:31 ` Eli Zaretskii
2022-09-24 15:31 ` Manuel Giraud [this message]
2022-09-24 16:09 ` Eli Zaretskii
2022-09-25 16:51 ` Manuel Giraud
2022-09-25 19:14 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zgeon60n.fsf@elite.giraud \
--to=manuel@ledu-giraud.fr \
--cc=58028@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).