From: Eli Zaretskii <eliz@gnu.org>
To: "Gerd Möllmann" <gerd.moellmann@gmail.com>
Cc: gerd@gnu.org, gongqijian@gmail.com, 74274@debbugs.gnu.org
Subject: bug#74274: [PATCH] Revert part of d3f8ed730f to avoid segmentation fault
Date: Sat, 09 Nov 2024 10:17:23 +0200 [thread overview]
Message-ID: <86cyj4om7g.fsf@gnu.org> (raw)
In-Reply-To: <m2bjyo3m67.fsf@gmail.com> (message from Gerd Möllmann on Sat, 09 Nov 2024 08:23:44 +0100)
> Cc: Gerd Möllmann <gerd@gnu.org>, 74274@debbugs.gnu.org
> From: Gerd Möllmann <gerd.moellmann@gmail.com>
> Date: Sat, 09 Nov 2024 08:23:44 +0100
>
> Gerd Möllmann <gerd.moellmann@gmail.com> writes:
>
> > qijian gong <gongqijian@gmail.com> writes:
> >
> >> Gerd Möllmann <gerd.moellmann@gmail.com>于2024年11月9日 周六下午12:15写道:
> >>
> >> Do I understand this right, that the advice you add to
> >> tty-tip-compute-position only serves the purpose of being able to pop up
> >> a tip frame early, when mouse-position doesn't really have a position to
> >> report? Or does it also serve another purpose?
> >>
> >> Yes, that's correct, there is no other purpose. It seems
> >> mouse-position doesn't really have a position until the mouse was
> >> moved by user.
> >
> > Ok, thanks.
> >
> > I think I know what this is. It's the very particular case of the very
> > first redisplay + presence of a child freame, which copies glyphs from a
> > current matrix that is still clear, i.e. zeroed, so that glyph::frame
> > is zero and so on.
>
> Which is fixed for me with
>
> 1 file changed, 6 insertions(+), 3 deletions(-)
> src/dispnew.c | 9 ++++++---
>
> modified src/dispnew.c
> @@ -3544,9 +3544,12 @@ prepare_desired_root_row (struct frame *root, int y)
> if (!root_row->enabled_p)
> {
> struct glyph_row *from = MATRIX_ROW (root->current_matrix, y);
> - memcpy (root_row->glyphs[0], from->glyphs[0],
> - root->current_matrix->matrix_w * sizeof (struct glyph));
> - root_row->enabled_p = true;
> + if (from->enabled_p)
> + {
> + memcpy (root_row->glyphs[0], from->glyphs[0],
> + root->current_matrix->matrix_w * sizeof (struct glyph));
> + root_row->enabled_p = true;
> + }
> }
> return root_row;
> }
Should this perhaps have an eassert which verifies that every glyph
has a valid frame pointer? At the very least please add a comment
there explaining the need for the enabled_p test and mentioning the
frame pointer of the glyphs.
Thanks.
next prev parent reply other threads:[~2024-11-09 8:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-08 6:31 bug#74274: [PATCH] Revert part of d3f8ed730f to avoid segmentation fault Gong Qijian
2024-11-09 4:15 ` Gerd Möllmann
2024-11-09 6:10 ` qijian gong
2024-11-09 6:59 ` Gerd Möllmann
2024-11-09 7:23 ` Gerd Möllmann
2024-11-09 8:02 ` Gerd Möllmann
2024-11-09 8:17 ` Eli Zaretskii [this message]
2024-11-09 8:26 ` Gerd Möllmann
2024-11-10 10:56 ` Gerd Möllmann
2024-11-10 19:06 ` Gerd Möllmann
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=86cyj4om7g.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=74274@debbugs.gnu.org \
--cc=gerd.moellmann@gmail.com \
--cc=gerd@gnu.org \
--cc=gongqijian@gmail.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.