Subject: Re: bug#33885: 27.0.50; PUA character makes emacs crash

From: Eli Zaretskii <[email-masked]>
Date: Sat, 12 Feb 2022 10:57:50 +0200

> Resent-From: Lars Ingebrigtsen <[email-masked]>
> Original-Sender: "Debbugs-submit" <[email-masked]>
> Resent-CC: [email-masked]
> Resent-Sender: [email-masked]
> From: Lars Ingebrigtsen <[email-masked]>
> Date: Sat, 12 Feb 2022 09:42:16 +0100
> Cc: [email-masked]
> 
> Werner LEMBERG <[email-masked]> writes:
> 
> > Loading the attached file `bug.el' (containing the single PUA
> > character U+E6A3) with
> >
> >   emacs -Q bug.el
> >
> > causes a crash:
> >
> >   xdisp.c:28955:
> >     Emacs fatal error:
> >       assertion failed:
> >         it->ascent >= 0 && it->descent >= 0
> 
> (I'm going through old bug reports that unfortunately weren't resolved
> at the time.)
> 
> I vaguely recall a similar problem being fixed recently (but not with
> this specific character).  Would it be possible for you to try Emacs 28/29
> and see whether the problem is still present there?

Yes, we now do

      if (it->ascent < 0)
	it->ascent = 0;
      if (it->descent < 0)
	it->descent = 0;

so I think this assertion violation should not happen anymore.  (And
in a production build, the assertion goes away anyway.)