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

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

bug#61704: 29.0.60; Crash in get_narrowed_begv


From: Gregory Heytings
Subject: bug#61704: 29.0.60; Crash in get_narrowed_begv
Date: Wed, 22 Feb 2023 13:17:27 +0000


How can len possibly be 0 at that point? It is (in short) window_body_width (w, WINDOW_BODY_IN_CANONICAL_CHARS) * window_body_height (w, WINDOW_BODY_IN_CANONICAL_CHARS). We could add a condition in get_narrowed_len to return 1 when the result is 0, but it could be a bug somewhere else (can a window body have a zero width and/or height?), in which case it would be better to fix the bug there.

I agree that we should understand how this happened (and asked a similar question), but I installed a defensive protection anyway. It cannot do any harm.


Okay.  Let's hope this will not hide another real bug.

I found a way to get such small windows: set window-min-width, window-min-height, window-safe-min-width and window-safe-min-heigth to 0. Of course doing that ignores the fact that the docstring of the window-safe-min-* variables say that "Anything less might crash Emacs", and that their values are 2 (width) and 1 (height). Which makes me wonder why these variables can be changed / exist.






reply via email to

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