From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#61704: 29.0.60; Crash in get_narrowed_begv Date: Wed, 22 Feb 2023 21:16:31 +0800 Message-ID: <87zg95on68.fsf@yahoo.com> 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> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15712"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Gregory Heytings , 61704@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 22 14:19:14 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 1pUp1e-0003xN-Mx for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 22 Feb 2023 14:19:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUp1T-0002NX-FX; Wed, 22 Feb 2023 08:19:03 -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 1pUp1S-0002NO-5m for bug-gnu-emacs@gnu.org; Wed, 22 Feb 2023 08:19: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 1pUp1R-0006ak-Ty for bug-gnu-emacs@gnu.org; Wed, 22 Feb 2023 08:19:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pUp1R-0002Cy-PS for bug-gnu-emacs@gnu.org; Wed, 22 Feb 2023 08:19:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Feb 2023 13:19:01 +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.16770719318470 (code B ref 61704); Wed, 22 Feb 2023 13:19:01 +0000 Original-Received: (at 61704) by debbugs.gnu.org; 22 Feb 2023 13:18:51 +0000 Original-Received: from localhost ([127.0.0.1]:58281 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pUp1H-0002CX-4w for submit@debbugs.gnu.org; Wed, 22 Feb 2023 08:18:51 -0500 Original-Received: from sonic303-48.consmr.mail.ne1.yahoo.com ([66.163.188.174]:37679) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pUp1E-0002CK-Lh for 61704@debbugs.gnu.org; Wed, 22 Feb 2023 08:18:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1677071922; bh=1qk1lzI0ONLpHfgHGSNmhDJgtlS98rdRTIVk4ovg204=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=pKiscYEGoY1dBcUP3aMvyOTn0103CSusl9yf2x8U1QyCoRiJb2MkAbwD2NluiRnWLYh0YW2y4tf15SVnLZtfjRQ9JIOBkqwLLyKhqq72hCHOS0QqFCE9X+hCLMmne0iFokZ4y6mQGEvMEYy5IZ9d0D+82Rsf60n6MwTGYASHcK9nz6kJMF4Ld0LKb0HXQwZUFDK/UQw55Y32/oXQjIqe4wXXxREh0sMewJAvYE8jst4KFB1YfyUpao2XmuC6WXFjqVy0pxWvqxLkvEwtYZAR5gJCo/pImCW/3MjktwqMN+yWBg3XqzlNhAKYSeIFRGuBSIlY9QZhoX0ppsGPBFwVwA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1677071922; bh=agtuvQ+By3ZgeiuoaG3Agjqsmnsf67dmg9eNwVcOeCT=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=fA5eyeKJFRhY23KqpaqiEoYpU6tODymska70Ytf5nW8te4dfjWyC8EpA9t+V8LNBZhKmhiKdwNv/Ns9t6sG423VCKE0eFrrZs9F5JWR1vkcZUwKHVyjNA2wZG8sglKrJz5vP1pueovbLysm7BTEUdPicaI8I+5lHZNTGArd5z1Z9NSsp/gT8uuoaYnI1WLLeGizK8Mp2irvJpJXtJUOzZBr1PoJw54IdDKhv2tn4gwCW2MihQiThF37PaTDm/vZvtOwn5KGGkQJGXtDZU4phytdrXl+4yXcjslQu4ij8UssOka2CD0Y6evhCHXZJPMEX0/4n4QEGivkcRmMhkWvKtg== X-YMail-OSG: eBR_FN8VM1kILaAwgooxLrZ0uI.lxVRmOlJd9pDLL6jfhLFjk6S0sNnoBeZJws6 M2m_iB4p5L7pxetkz8uxaHk3g_hmuvlLcn7Li16G_hsWOsX3eX.X_3WthxL6AbPex0RZ9IsduGO6 0czBhESNhOchQA.CDNv3dHY1PbeUQb1N6w8I3vugfMfstnZDIiRQKAqggYPK_dpYTStYBNkG_9xL nQ5vBswXQw1rIce2pkrmL0_dOBUZ3PYlv7aPLL7Le1A3RX7a2nSeh.uJcJ7AEWCPXhUc8WsvYCyG lisLd2RGM9YGJZPWs1DIx0rMiRIUjNEN.YEdgL8fhSHHT4w2tmkxx6klpQ5SUKfudPMWRfn91kX8 vWPzIJeaxBhsPnoo8oG8ORla4jm28QBYc6X8Oflu.yZkdtAbApPx1XU._wLbsmCrJH_jzrkcxS68 7hLRvDCP5.5uc3RMVtdSiOitVn9SNvjemjoIMkiMS4xZUzWLZngX1p6V9KsrgH2DVH_QFNKi8ubV 5B3cu4AbPG5vDIjF5p71AhgiUmUOcRs2VmYllsK8m0e6cW5_G0GuNG96QwKiaet1pftWOpPPDXNO .Tqn6I.iahwgRCZ7CQc1G5kx3YGO9l4tY2W4H0t5dzCv64KayzD4Z_54MN5OkYJdBsPibsJMN6D7 uTmyPpjUvxjijRd7b6TpaPutDYPDHAleBwXodOCr8abeVVw6IToGyxOYg_oJkZGt9S4QNnPmygpY PlMBM8cMGBDLkc0IkTkuV0IChUjvDLmnFAyymRnimx2HlSujrsubg8ESLQmRUPnwwYcr7kcX5ioL xIr.dP8oOqchPG6ZVKqUaP1Izd2SwlGizozSgYutJF X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.ne1.yahoo.com with HTTP; Wed, 22 Feb 2023 13:18:42 +0000 Original-Received: by hermes--production-sg3-9fc5746c8-pz6sb (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 4cd3d3ddf6a1bf0d8f406b50b11d69c7; Wed, 22 Feb 2023 13:16:37 +0000 (UTC) In-Reply-To: <83cz61svnc.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 22 Feb 2023 14:59:51 +0200") X-Mailer: WebService/1.1.21183 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo 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:256342 Archived-At: Eli Zaretskii writes: >> How can len possibly be 0 at that point? It is (in short) Because the pixel width of W is less than its frame's column width. The division performed window_body_width is truncating, i.e: 24 / 25 = 0 and I suspect the actual width being divded at that point is less than w->pixel_width, since that window had fringes. >> 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. I did say that this happened while resizing the window. It was being displayed in an ediff-created frame.