Subject: Re: bug#58028: 29.0.50; Ensures no leakage of glyph_matrix

From: Eli Zaretskii <[email-masked]>
Date: Sat, 24 Sep 2022 08:46:20 +0300

> From: Manuel Giraud <[email-masked]>
> Cc: [email-masked]
> Date: Fri, 23 Sep 2022 22:43:53 +0200
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> >> From: Manuel Giraud <[email-masked]>
> >> Cc: [email-masked]
> >> Date: Fri, 23 Sep 2022 17:59:48 +0200
> >> 
> >> Eli Zaretskii <[email-masked]> writes:
> >> 
> >> >> From: Manuel Giraud <[email-masked]>
> >> >> Date: Fri, 23 Sep 2022 17:22:07 +0200
> >> >> 
> >> >> Maybe this problem never triggers.  It is a « better be safe » kind of
> >> >> patch.
> >> >
> >> > Please add an assertion there, to catch the case that previously was
> >> > handled by testing only w->desired_matrix.
> >> 
> >> I do not understand what you mean here.
> >
> > I mean the assertion that triggers when w->desired_matrix is NULL, but
> > w->current_matrix isn't.
> 
> Oh I see.  I add the following:
> --8<---------------cut here---------------start------------->8---
> 	  eassert ((w->desired_matrix == NULL) &&
> 		   (w->current_matrix != NULL));
> --8<---------------cut here---------------end--------------->8---
> 
> and test a little bit with emacs -Q and nothing break.  So I think
> you're right: when w->desired_matrix is NULL, both are.

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.

Thanks.