From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Kai Ma Newsgroups: gmane.emacs.bugs Subject: bug#65060: 29.1.50; display_count_lines segv Date: Sat, 12 Aug 2023 19:56:27 +0800 Message-ID: <0F00067E-9020-4AA5-9F00-AB7AF97ED051@gmail.com> References: <83wmyat3b2.fsf@gnu.org> <835y5kg3f7.fsf@gnu.org> <325C6C15-2066-4331-8948-11BEC717ADE9@gmail.com> <83msywejpu.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_FDD1943C-A1AD-4082-8273-D816A260FFAF" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23439"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65060@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 12 13:57:16 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 1qUnF6-0005sL-Qe for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 12 Aug 2023 13:57:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qUnEv-00064C-0o; Sat, 12 Aug 2023 07:57:05 -0400 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 1qUnEs-00063s-Vd for bug-gnu-emacs@gnu.org; Sat, 12 Aug 2023 07:57:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qUnEs-0003gY-GZ for bug-gnu-emacs@gnu.org; Sat, 12 Aug 2023 07:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qUnEs-0002ZS-7o for bug-gnu-emacs@gnu.org; Sat, 12 Aug 2023 07:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kai Ma Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Aug 2023 11:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65060 X-GNU-PR-Package: emacs Original-Received: via spool by 65060-submit@debbugs.gnu.org id=B65060.16918414099863 (code B ref 65060); Sat, 12 Aug 2023 11:57:02 +0000 Original-Received: (at 65060) by debbugs.gnu.org; 12 Aug 2023 11:56:49 +0000 Original-Received: from localhost ([127.0.0.1]:48842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUnEe-0002Yz-KZ for submit@debbugs.gnu.org; Sat, 12 Aug 2023 07:56:49 -0400 Original-Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:46256) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUnEc-0002Yi-7x for 65060@debbugs.gnu.org; Sat, 12 Aug 2023 07:56:47 -0400 Original-Received: by mail-pf1-x442.google.com with SMTP id d2e1a72fcca58-6874d1c8610so1995949b3a.0 for <65060@debbugs.gnu.org>; Sat, 12 Aug 2023 04:56:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691841400; x=1692446200; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=/XVJ4G0mvwIbNEurcDJzqJXLODh7lzQ86ITtuYcMJg4=; b=c43FrNIeweg/7ToTWjyPW52T+AYn7i8k6TDPhTqBnKHmjlwpLpHMIOhee+MkhzW1co mzvCYWHp+6Q/ENGhEy0io0w8DVZFt7oTeJgi8KwAwjtmUUYOU8rQoVM1KEcpRVPc5Ml5 aOSfUmI4qZj6w4OfJJLvkK1Y1KuxkojeSlmhiuR7B2D4DtpFbHAkhLYpzBgNrpxRNsJ2 R93TeNjtCRS0vBTb3lQtRZom4G7izJfwlI6wRxqG6L03IRGDgZe9tRXQX9UhFFV/D3oE oWaUn4YsMe0YDZT80bA6+QdQxz1aAyJ5DX0ae56rvqhZSvtVnEsvd84gO7K94eni+TUQ jQnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691841400; x=1692446200; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/XVJ4G0mvwIbNEurcDJzqJXLODh7lzQ86ITtuYcMJg4=; b=QQaRQhZAzpmeCOcHzIYPLOOqgMK2bWpQbX6abcJP8mLnsxRkBqWb907xxkiifwzgGI rGfAdk56bQhR2f/8wtKS6MyH3NCKtb8WnESVobCxl4fp3ORy5Q9mRQC8UWHdzUXCm0oi iQRv2xVrsRzQg1oMAetuZXq+YmH8RJ1xa+gT27DdeDfHUKDrBKSuUd97nz8qlcFZ+kME 3Y4ZZiBgLgilY+RYhaEv0wB0bplYPKDf8HMKtJzwJXInyWztmCMgp8WWODfFGv2we08o iyBQgeO2zSJUqGCet31PVVLOLnHoFMxSNNrybp3ikXuHS7qDuhRKoiarLLd77jqixyUp ckMw== X-Gm-Message-State: AOJu0YyKujM4MQbpAshEBEZudZi3HpL5RSghch1RXY8Rm5q/Q2b+6S3b XhwBe9a4GsnSFsVqOX2CDe3mdkhqr2xBmyAvxQE= X-Google-Smtp-Source: AGHT+IEaPBb/OgsoU1w2cwoIJOvxRETPWhAqbftiC1IGXefc4ZzWpMhfHeMNsNW4eP17oTMGxnb/zQ== X-Received: by 2002:a05:6a00:21d1:b0:67f:d4e2:3dd7 with SMTP id t17-20020a056a0021d100b0067fd4e23dd7mr3911099pfj.21.1691841400248; Sat, 12 Aug 2023 04:56:40 -0700 (PDT) Original-Received: from smtpclient.apple (42-2-75-028.static.netvigator.com. [42.2.75.28]) by smtp.gmail.com with ESMTPSA id n21-20020aa79055000000b006878c00537bsm4789241pfo.120.2023.08.12.04.56.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Aug 2023 04:56:39 -0700 (PDT) In-Reply-To: <83msywejpu.fsf@gnu.org> X-Mailer: Apple Mail (2.3731.700.6) 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:267302 Archived-At: --Apple-Mail=_FDD1943C-A1AD-4082-8273-D816A260FFAF Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Aug 12, 2023, at 16:41, Eli Zaretskii wrote: >=20 >> From: Kai Ma >> Date: Sat, 12 Aug 2023 15:28:16 +0800 >> Cc: 65060@debbugs.gnu.org >>=20 >>> On Aug 12, 2023, at 14:50, Eli Zaretskii wrote: >>>=20 >>> Ping! Can you please help me finish investigating this bug by >>> providing the information I asked for? Armed with that information, = I >>> think I will be able to find a solution. >>=20 >> Sorry for the late reply! >>=20 >> cursor (before do) =3D 0x0 >> * GPT_BYTE =3D 3072 >> * GAP_SIZE =3D 2000 >> * BEG_ADDR =3D 0x0 >> * current_buffer->text->beg =3D 0x0 >>=20 >> cursor (before memchr) =3D 0x0 >> * GPT_BYTE =3D 3072 >> * GAP_SIZE =3D 2000 >> * BEG_ADDR =3D 0x0 >> * current_buffer->text->beg =3D 0x0 >=20 > Thanks. My guess was correct: the buffer in question was killed. >=20 > Could you please try the patch below, and see if it avoids the > crashes? The patch causes Emacs to signal an error when > format-mode-line is called for a dead buffer, so if I did this > correctly, you should see that Emacs no longer crashes, but there are > error messages about a dead buffer in *Messages*. If this is what > happens, you should then take this up with the dirvish developers, and > ask them to avoid calling format-mode-line for a killed buffer. Thanks! The patch prevents the crash. I will report this to dirvish = developers. --Apple-Mail=_FDD1943C-A1AD-4082-8273-D816A260FFAF Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

On Aug = 12, 2023, at 16:41, Eli Zaretskii <eliz@gnu.org> wrote:

From: Kai Ma = <justksqsf@gmail.com>
Date: Sat, 12 Aug 2023 15:28:16 = +0800
Cc: 65060@debbugs.gnu.org

On = Aug 12, 2023, at 14:50, Eli Zaretskii <eliz@gnu.org> = wrote:

Ping!  Can you please help me finish investigating = this bug by
providing the information I asked for?  Armed with = that information, I
think I will be able to find a = solution.

Sorry for the late reply!

cursor = (before do) =3D 0x0
* GPT_BYTE =3D 3072
* GAP_SIZE =3D 2000
* = BEG_ADDR =3D 0x0
* current_buffer->text->beg =3D = 0x0

cursor (before memchr) =3D 0x0
* GPT_BYTE =3D 3072
* = GAP_SIZE =3D 2000
* BEG_ADDR =3D 0x0
* = current_buffer->text->beg =3D 0x0

Thanks.  My guess = was correct: the buffer in question was killed.

Could you please try the = patch below, and see if it avoids the
crashes?  The patch causes Emacs to signal an error = when
format-mode-line is = called for a dead buffer, so if I did this
correctly, you should see that Emacs no longer crashes, but = there are
error messages about a = dead buffer in *Messages*.  If this is what
happens, you should then = take this up with the dirvish developers, and
ask them to avoid = calling format-mode-line for a killed buffer.

Thanks!  The = patch prevents the crash.  I will report this to dirvish = developers.

= --Apple-Mail=_FDD1943C-A1AD-4082-8273-D816A260FFAF--