From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#61704: 29.0.60; Crash in get_narrowed_begv Date: Wed, 22 Feb 2023 15:44:23 +0200 Message-ID: <834jrdstl4.fsf@gnu.org> References: <874jrdq4ct.fsf.ref@po-lus-librem-15.mail-host-address-is-not-set> <874jrdq4ct.fsf@po-lus-librem-15.mail-host-address-is-not-set> <83cz61svnc.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30803"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, 61704@debbugs.gnu.org To: Gregory Heytings , martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 22 14:45:18 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pUpQr-0007oj-K0 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 22 Feb 2023 14:45:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUpQf-0003Zp-AX; Wed, 22 Feb 2023 08:45:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUpQc-0003ZJ-Ve for bug-gnu-emacs@gnu.org; Wed, 22 Feb 2023 08:45:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pUpQc-0000ew-ML for bug-gnu-emacs@gnu.org; Wed, 22 Feb 2023 08:45:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pUpQc-0002wH-HE for bug-gnu-emacs@gnu.org; Wed, 22 Feb 2023 08:45:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Feb 2023 13:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61704 X-GNU-PR-Package: emacs Original-Received: via spool by 61704-submit@debbugs.gnu.org id=B61704.167707345811199 (code B ref 61704); Wed, 22 Feb 2023 13:45:02 +0000 Original-Received: (at 61704) by debbugs.gnu.org; 22 Feb 2023 13:44:18 +0000 Original-Received: from localhost ([127.0.0.1]:58345 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pUpPt-0002uZ-Mp for submit@debbugs.gnu.org; Wed, 22 Feb 2023 08:44:18 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46932) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pUpPr-0002uM-OM for 61704@debbugs.gnu.org; Wed, 22 Feb 2023 08:44:16 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUpPm-0000Np-7v; Wed, 22 Feb 2023 08:44:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=5TS2SgFshSA3BzsV9ofnHZ7Ynz7Cxa2dlvbj4wZ9yoo=; b=htI+efzAOFYA Apkl1fPgvQcAbKd+IUrp13sregZWNvSTFy2EwwKf66Hjgcc7ySgmgtnSy+pmSXRZInMXXyp/4ox30 oWu1x3sdkTQJBoMYG7cV5t844RYJGGqUATs2CH8V2Ng/1QmL3YNbAWpIZGRu2EXhiaGISNVjeeLoL Qu2zMHNr2WqyZQaqUl4Ga1R8sbLbfBpUNuO/dmfyJehpNhtKTmihus+jE/sCYaHSHbI/Y7fJLy0eH zhU7B875rFamkYHB1vxPjL0Zf98u/NXtzwG5yfKb/o2z62fdGgvlNN2Rt5bO2gly44CDeDBySt4du eb7ecE+RGvx3o3tCqeei5w==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUpPl-0004hi-Mi; Wed, 22 Feb 2023 08:44:10 -0500 In-Reply-To: (message from Gregory Heytings on Wed, 22 Feb 2023 13:17:27 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:256351 Archived-At: > Date: Wed, 22 Feb 2023 13:17:27 +0000 > From: Gregory Heytings > cc: luangruo@yahoo.com, 61704@debbugs.gnu.org > > > >> 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. Maybe Martin (CC'ed) can answer that.