unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Seppo Ronkainen via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 63283@debbugs.gnu.org
Subject: bug#63283: Emacs crash within fontset
Date: Mon, 08 May 2023 21:22:21 +0000	[thread overview]
Message-ID: <bWxP6EDJmSHCZpRAX76qz1AxCBYGQCgKpOBXKj4tFaakrDNV2AOtPg5Tc_4nORrWKk5xy4SZ67Umvs0NnWFaSOH6YD32EYqmBUPGxEUDB-E=@protonmail.com> (raw)
In-Reply-To: <83ttwoeiwf.fsf@gnu.org>

Your suggested patch successfully avoided the abort, great !

Where the abort would previously occur now instead the buffer renders all characters with four digit code point rectangular representations which I would consider preferable to an abort the entire emacs server session with thirty or so windows. Tested with visiting a large file emacs/src/xdisp.c and Emacs swapps back to render regular characters when text is scaled back. I would vote for your suggested fix, well done thank you !




Live long and prosper

Sent with Proton Mail secure email.

------- Original Message -------
On Sunday, May 7th, 2023 at 6:48 AM, Eli Zaretskii <eliz@gnu.org> wrote:


> > Date: Sat, 06 May 2023 22:36:35 +0000
> > From: Seppo Ronkainen sodr80@protonmail.com
> > Cc: 63283@debbugs.gnu.org
> > 
> > (gdb) frame 2
> > #2 0x00000055559233c4 in face_for_char (f=0x55564c8470, face=0x5556292b90, c=12302, pos=1, object=XIL(0)) at fontset.c:970
> > 970 eassert (fontset_id_valid_p (face->fontset));
> > (gdb) info locals
> > fontset = XIL(0)
> > rfont_def = XIL(0x555605b2b8)
> > charset = XIL(0x300effff7380)
> > face_id = 85
> > id = 1432078920
> > (gdb) print font_driver_list
> > $1 = (struct font_driver_list *) 0x55560d77e0
> > (gdb) print f->font_driver_list
> > $2 = (struct font_driver_list *) 0x5556274ae0
> > (gdb) frame 3
> > #3 0x00000055555bd308 in FACE_FOR_CHAR (f=0x55564c8470, face=0x5556292b90, character=12302, pos=1, object=XIL(0)) at dispextern.h:1911
> > (gdb) p face->font
> > $5 = (struct font *) 0x0
> > (gdb) p face->fontset
> > $6 = -1
> > (gdb) q
> 
> 
> Thanks. If you apply the patch below, does it avoid the abort?
> 
> > relevant commit ?
> > 3c0dda2663e38635163f0fd6c19748c6eba1c3c8
> > Avoid asserting for fontset validity before it is used
> 
> 
> No, I don't think so. We'd just abort earlier in that function.
> 
> diff --git a/src/fontset.c b/src/fontset.c
> index f196dee..e004cd9 100644
> --- a/src/fontset.c
> +++ b/src/fontset.c
> @@ -967,6 +967,9 @@ face_for_char (struct frame *f, struct face *face, int c,
> #endif
> }
> 
> + if (face->fontset < 0 && !face->font)
> 
> + return face->id;
> 
> +
> eassert (fontset_id_valid_p (face->fontset));
> 
> fontset = FONTSET_FROM_ID (face->fontset);
> 
> eassert (!BASE_FONTSET_P (fontset));





  reply	other threads:[~2023-05-08 21:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-04 19:04 bug#63283: Emacs crash within fontset Seppo Ronkainen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-05  3:19 ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-05  4:37 ` Eli Zaretskii
     [not found]   ` <O0y0FC8UdwKgg50s40rJP5ahH61bZfOHqEE6soqVPHCOnUr0PvUNonc9GL2dmbHDWiwZBu_6Pc29DlpXNQE80C5vQJRrgGza-nVbU_OczfY=@protonmail.com>
2023-05-06 10:20     ` Eli Zaretskii
2023-05-06 19:12       ` Seppo Ronkainen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-06 19:33         ` Eli Zaretskii
2023-05-06 22:36           ` Seppo Ronkainen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-07  6:48             ` Eli Zaretskii
2023-05-08 21:22               ` Seppo Ronkainen via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-05-09  5:26                 ` 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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='bWxP6EDJmSHCZpRAX76qz1AxCBYGQCgKpOBXKj4tFaakrDNV2AOtPg5Tc_4nORrWKk5xy4SZ67Umvs0NnWFaSOH6YD32EYqmBUPGxEUDB-E=@protonmail.com' \
    --to=bug-gnu-emacs@gnu.org \
    --cc=63283@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=sodr80@protonmail.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).