help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is `(1 . width)` zero?


From: Eli Zaretskii
Subject: Re: Why is `(1 . width)` zero?
Date: Sun, 24 Jan 2021 16:54:46 +0200

> From: Robert Pluim <rpluim@gmail.com>
> Cc: help-gnu-emacs@gnu.org, eliz@gnu.org
> Date: Sun, 24 Jan 2021 11:45:15 +0100
> 
>     Jörg> Author: Stefan Monnier <monnier@iro.umontreal.ca>
>     Jörg> Date:   Thu Oct 8 09:49:20 2020 -0400
> 
>     Jörg>     * src/ftcrfont.c (ftcrfont_open): Initialize the `max_width` 
> field
>     
>     Jörg>     On a 32bit build, Emacs can otherwise crash with a 
> !FIXNUM_OVERFLOW_P
>     Jörg>     assertion in `Ffont_info` by simply doing `emacs -Q` and then 
> `C-s`.
>     
>     Jörg>     * src/font.c: Try and detect uninitialized `max_width` fields.
>     Jörg>     (font_make_object): Set max_width to a silly value.
>     Jörg>     (Ffont_info): Check the value is not silly any more.
> 
> Eli, is this ok to backport to emacs-27?

Hmm... I'm not sure I understand how this solves the issue.
Everything that's in eassert will compile to nothing in a production
build, and the rest doesn't really ensure max_width is initialized to
a reasonable value (zero is as unreasonable as a large value)?

Isn't there a better fix for this?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]