all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: luangruo@yahoo.com, 58334@debbugs.gnu.org
Subject: bug#58334: 29.0.50; ASAN heap use after free in gui_produce_glyphs
Date: Fri, 07 Oct 2022 14:01:49 +0200	[thread overview]
Message-ID: <m2r0zjhmfm.fsf@Mini.fritz.box> (raw)
In-Reply-To: <83h70foo3h.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 07 Oct 2022 14:44:02 +0300")

Eli Zaretskii <eliz@gnu.org> 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, and continue with what I wanted to
try out in the branch here.  It has only gpt one commit so far, in 3 or
4 days.

> One other thing is that inhibit_free_realized_faces is a boolean, so
> if nesting is possible, it cannot support such nesting; we'd need a
> reference count instead.

Yes, that's why I asked if we get by with something like this:

diff --git a/src/xdisp.c b/src/xdisp.c
index 9534e27843..fd94509fe4 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -3179,7 +3179,8 @@ init_iterator (struct it *it, struct window *w,
      free realized faces now because they depend on face definitions
      that might have changed.  Don't free faces while there might be
      desired matrices pending which reference these faces.  */
-  if (!inhibit_free_realized_faces)
+  if (!inhibit_free_realized_faces
+      && !garbage_collection_inhibited)
     {
       if (face_change)
 	{

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.





  reply	other threads:[~2022-10-07 12:01 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-06 15:03 bug#58334: 29.0.50; ASAN heap use after free in gui_produce_glyphs Gerd Möllmann
2022-10-06 16:00 ` Eli Zaretskii
2022-10-06 18:01   ` Gerd Möllmann
2022-10-06 18:30     ` Eli Zaretskii
2022-10-06 18:36       ` Gerd Möllmann
2022-10-07 12:01         ` Eli Zaretskii
2022-10-07 12:03           ` Gerd Möllmann
2022-10-07 12:06             ` Eli Zaretskii
2022-10-07 12:08               ` Gerd Möllmann
2022-10-07 12:12                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-07 12:16                   ` Eli Zaretskii
2022-10-07 12:23                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-07 12:14                 ` Eli Zaretskii
2022-10-07 12:34                   ` Gerd Möllmann
2022-10-07  0:37     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-07  5:06       ` Gerd Möllmann
2022-10-07  7:12         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-07  7:20           ` Gerd Möllmann
2022-10-07  0:46 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-07  5:23   ` Gerd Möllmann
2022-10-07  7:03   ` Eli Zaretskii
2022-10-07  7:20     ` Gerd Möllmann
2022-10-07  8:07       ` Gerd Möllmann
2022-10-07  8:36         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-07  8:54           ` Gerd Möllmann
2022-10-07 10:28             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-07 11:11               ` Gerd Möllmann
2022-10-07 11:19                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-07 11:34                   ` Eli Zaretskii
2022-10-07 11:38                   ` Gerd Möllmann
2022-10-07 11:29               ` Eli Zaretskii
2022-10-07 12:16                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-07 12:27                   ` Eli Zaretskii
2022-10-07 11:19             ` Eli Zaretskii
2022-10-07 11:34               ` Gerd Möllmann
2022-10-07 11:13           ` Eli Zaretskii
2022-10-07 11:08         ` Eli Zaretskii
2022-10-07 11:29           ` Gerd Möllmann
2022-10-07 11:44             ` Eli Zaretskii
2022-10-07 12:01               ` Gerd Möllmann [this message]
2022-10-07 12:05                 ` Eli Zaretskii
2022-10-07 12:14                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-07 12:17                   ` Gerd Möllmann
2022-10-07 12:22                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-07 12:36                       ` Gerd Möllmann
2022-10-08  6:58 ` Gerd Möllmann
2022-10-08  7:59   ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2r0zjhmfm.fsf@Mini.fritz.box \
    --to=gerd.moellmann@gmail.com \
    --cc=58334@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=luangruo@yahoo.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.