Subject: Re: bug#61704: 29.0.60; Crash in get_narrowed_begv

From: Po Lu <[email-masked]>
Date: Thu, 23 Feb 2023 21:11:43 +0800

Gregory Heytings <[email-masked]> writes:

> I maintain that the bug is (was) most probably not in get_narrowed_*.
> I just built Emacs with the GTK, Lucid and no toolkits, I disabled
> everything (tool-bar, menu-bar, scroll-bar, fringe-mode 0), and even
> with that, after resizing the Emacs frame until it is literally a
> single pixel on screen, I'm not able to get (under emacs -Q) a window
> width or a height equal to 0 there.  The smallest values I get are
> width = 2 and height = 1.

What if you send a ConfigureNotify event with x, y, width, height all
set to 0, and with a frame font set larger than the font in the ediff
control window?  Or some ridiculous value like (CARD16) -1?

> That, the fact that this code has been there for a half year without a
> single reported crash (if resizing a window is enough to trigger such
> a crash, that would surely have happened already), and the fact that
> get_narrowed_* is not executed at all in the ediff control frame,
> means that there is a bug somewhere else.

Feel free to try to find that other bug, but I can't, since this bug now
seems to be fixed.

Thanks.