[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Crash with --enable-checking and some glyphs
From: |
Lars Ingebrigtsen |
Subject: |
Re: Crash with --enable-checking and some glyphs |
Date: |
Sat, 27 Nov 2021 15:04:56 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
> But what about the font? We don't use the above for it->descent, at
> least not directly. So where in the code did it->descent get
> negative?
(gdb) p font->descent
$14 = 2
(gdb) print boff
$15 = 3
I think it has to be from here:
if (it->char_to_display != '\n' && it->char_to_display != '\t')
{
it->nglyphs = 1;
if (it->override_ascent >= 0)
{
it->ascent = it->override_ascent;
it->descent = it->override_descent;
boff = it->override_boff;
}
else
{
it->ascent = FONT_BASE (font) + boff;
it->descent = FONT_DESCENT (font) - boff;
}
And boff is 3 because of:
boff = font->baseline_offset;
if (font->vertical_centering)
boff = VCENTER_BASELINE_OFFSET (font, it->f) - boff;
(gdb) print font->vertical_centering
$17 = true
And we don't apply these sanity checks in this case:
/* These limitations are enforced by an
assertion near the end of this function. */
if (it->ascent < 0)
it->ascent = 0;
if (it->descent < 0)
it->descent = 0;
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- Re: Crash with --enable-checking and some glyphs, (continued)
- Re: Crash with --enable-checking and some glyphs, Eli Zaretskii, 2021/11/25
- Re: Crash with --enable-checking and some glyphs, Lars Ingebrigtsen, 2021/11/26
- Re: Crash with --enable-checking and some glyphs, Eli Zaretskii, 2021/11/26
- Re: Crash with --enable-checking and some glyphs, Lars Ingebrigtsen, 2021/11/26
- Re: Crash with --enable-checking and some glyphs, Eli Zaretskii, 2021/11/26
- Re: Crash with --enable-checking and some glyphs, Lars Ingebrigtsen, 2021/11/26
- Re: Crash with --enable-checking and some glyphs, Eli Zaretskii, 2021/11/26
- Re: Crash with --enable-checking and some glyphs, Eli Zaretskii, 2021/11/27
- Re: Crash with --enable-checking and some glyphs,
Lars Ingebrigtsen <=
- Re: Crash with --enable-checking and some glyphs, Eli Zaretskii, 2021/11/27
- Re: Crash with --enable-checking and some glyphs, Lars Ingebrigtsen, 2021/11/27
- Re: Crash with --enable-checking and some glyphs, Po Lu, 2021/11/27
- Re: Crash with --enable-checking and some glyphs, Gregory Heytings, 2021/11/27
- Re: Crash with --enable-checking and some glyphs, Lars Ingebrigtsen, 2021/11/27
- Re: Crash with --enable-checking and some glyphs, Gregory Heytings, 2021/11/27
- Re: Crash with --enable-checking and some glyphs, Eli Zaretskii, 2021/11/28
- Re: Crash with --enable-checking and some glyphs, Gregory Heytings, 2021/11/29
- Re: Crash with --enable-checking and some glyphs, Lars Ingebrigtsen, 2021/11/29
- Re: Crash with --enable-checking and some glyphs, Óscar Fuentes, 2021/11/25