From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Why is `(1 . width)` zero?
Date: Sun, 24 Jan 2021 16:54:46 +0200 [thread overview]
Message-ID: <83a6sy4c7d.fsf@gnu.org> (raw)
In-Reply-To: <87y2givcjo.fsf@gmail.com> (message from Robert Pluim on Sun, 24 Jan 2021 11:45:15 +0100)
> 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?
next prev parent reply other threads:[~2021-01-24 14:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-18 8:51 Why is `(1 . width)` zero? Jörg Sommer
2021-01-18 15:06 ` Robert Pluim
2021-01-18 20:49 ` Michael Heerdegen
2021-01-18 22:23 ` Jörg Sommer
2021-01-19 9:37 ` Jörg Sommer
2021-01-19 10:32 ` Robert Pluim
2021-01-24 10:45 ` Robert Pluim
2021-01-24 14:54 ` Eli Zaretskii [this message]
2021-01-19 6:53 ` Robert Thorpe
2021-01-19 7:59 ` tomas
2021-01-19 9:37 ` Robert Thorpe
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=83a6sy4c7d.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/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.
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).