From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud Newsgroups: gmane.emacs.bugs Subject: bug#58028: 29.0.50; Ensures no leakage of glyph_matrix Date: Sat, 24 Sep 2022 12:29:17 +0200 Message-ID: <874jwxnk02.fsf@elite.giraud> References: <87illenmjk.fsf@elite.giraud> <83sfkiozub.fsf@gnu.org> <87czbmnksr.fsf@elite.giraud> <83k05uoujl.fsf@gnu.org> <878rm9om7q.fsf@elite.giraud> <834jwxpbo3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32339"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (berkeley-unix) Cc: 58028@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 24 12:30:18 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oc2QL-0008DV-3W for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 24 Sep 2022 12:30:17 +0200 Original-Received: from localhost ([::1]:43586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oc2QJ-0008O0-GR for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 24 Sep 2022 06:30:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49332) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oc2Q6-0008Nr-PY for bug-gnu-emacs@gnu.org; Sat, 24 Sep 2022 06:30:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43361) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oc2Q6-0000Ee-HB for bug-gnu-emacs@gnu.org; Sat, 24 Sep 2022 06:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oc2Q6-0005OH-Ai for bug-gnu-emacs@gnu.org; Sat, 24 Sep 2022 06:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Manuel Giraud Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Sep 2022 10:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58028 X-GNU-PR-Package: emacs Original-Received: via spool by 58028-submit@debbugs.gnu.org id=B58028.166401539420676 (code B ref 58028); Sat, 24 Sep 2022 10:30:02 +0000 Original-Received: (at 58028) by debbugs.gnu.org; 24 Sep 2022 10:29:54 +0000 Original-Received: from localhost ([127.0.0.1]:42439 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oc2Px-0005NP-MK for submit@debbugs.gnu.org; Sat, 24 Sep 2022 06:29:53 -0400 Original-Received: from ledu-giraud.fr ([51.159.28.247]:27067) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oc2Pv-0005NG-GS for 58028@debbugs.gnu.org; Sat, 24 Sep 2022 06:29:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=YYTWjR8DtTfRewRy /v9LOMG4HT/kb+8Mwbx+RiwwD5w=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=aLX4ZUIZKJHZrks3QIMWGK+U5+gOcwyumeP+f4 vDjkpDCBGz9tMJwKy3Y64XAc/wtBRqMWuQybmPNX9O3yYFygHSr0X/yayrjnLfp8gYDLdU oqlkCrpvzc9yLx+aN3sxQO3naeS9feXWFwDnkAeCYIjkBqsJ+rFsKDjuNA7IUPWnEztBPV E+Um1MPk9fWDp/QAFBC3B8cZkdFQkB9E9n3H0NIyvYsKrjQhpxVCP3ID7OBsvYtLJ4E6wz WVqn2Ddui2zx+JYkk3Yl+i7gUI2AS0FnZQi0tQGJHLL8iGXIGX40maMqsq17AB7GmoQGKk OLXwWJJQfj99laCqEZc+0JNA== Original-Received: from elite.giraud ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 69e8b6b9 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 24 Sep 2022 12:29:48 +0200 (CEST) In-Reply-To: <834jwxpbo3.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 24 Sep 2022 08:46:20 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:243513 Archived-At: --=-=-= Content-Type: text/plain Eli Zaretskii writes: [...] > Yes, that's what I meant. > > So we can install your change with the above assertion added, and then > wait for the assertion to trigger and investigate the case(s) where it > triggers to see whether we are missing something. Ok. So, as Po suggested, I did a "make check" with and without the new attached patch and get the same following summary result: SUMMARY OF TEST RESULTS ----------------------- Files examined: 450 Ran 6454 tests, 6340 results as expected, 18 unexpected, 96 skipped 1 files did not contain any tests: src/emacs-module-tests.log 10 files contained unexpected results: src/process-tests.log lisp/wdired-tests.log lisp/vc/vc-tests.log lisp/play/fortune-tests.log lisp/net/nsm-tests.log lisp/gnus/gnus-icalendar-tests.log lisp/epg-tests.log lisp/calendar/icalendar-tests.log lisp/bookmark-tests.log lisp/net/tramp-tests.log Thanks. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Ensures-no-leakage-of-glyph_matrix.patch >From ecd618cded21b2ad9d02c991e8f63b5137fe7b41 Mon Sep 17 00:00:00 2001 From: Manuel Giraud 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 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/dispnew.c b/src/dispnew.c index b786f0f1ba..9e4b43087e 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -1807,11 +1807,13 @@ allocate_matrices_for_window_redisplay (struct window *w) struct dim dim; /* If matrices are not yet allocated, allocate them now. */ + eassert ((w->desired_matrix == NULL) + && (w->current_matrix != NULL)); if (w->desired_matrix == NULL) - { - w->desired_matrix = new_glyph_matrix (NULL); - w->current_matrix = new_glyph_matrix (NULL); - } + w->desired_matrix = new_glyph_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); -- 2.37.3 --=-=-= Content-Type: text/plain -- Manuel Giraud --=-=-=--