Subject: Re: bug#58334: 29.0.50; ASAN heap use after free in gui_produce_glyphs

From: Eli Zaretskii <[email-masked]>
Date: Fri, 07 Oct 2022 15:05:41 +0300

> From: Gerd Möllmann <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Fri, 07 Oct 2022 14:01:49 +0200
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > So I would recommend to fix FACE_FROM_ID to re-generate the basic
> > faces if needed, on the assumption that the cases where we have
> > problems with using face ID are limited to basic faces.  If, after
> > that, we will find cases with non-basic faces, I'd first look for more
> > opportunities to use inhibit_free_realized_faces.
> 
> Sigh, I'd rather do something easy

I'm not sure there are any "easy" solutions to this.  We could keep
sprinkling inhibit_free_realized_faces some more (over the last years,
I added quite a few of them, and in other cases added calls to
realize_basic_faces).

> BTW, I've commented out the call to redisplay in nsterm.m
> layoutSomething now in my branch.  Let's see what the effect is.  So far
> I don't notice anything.

If Git history for the code which calls redisplay shows commits that
have references to bug reports in their log messages, perhaps read
those bug reports to see if they show recipes for problems that were
supposed to be fixed by adding that call.