From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#71681: 29.3.50; tree-sitter crash Date: Mon, 1 Jul 2024 00:01:23 -0700 Message-ID: References: <86h6dny3om.fsf@mail.linkov.net> <9D0E4C93-9CCC-4C0E-BDF7-CB6F09132C23@gmail.com> <86o77rpnjz.fsf@mail.linkov.net> <74F62063-1C20-4257-92BA-F2CF02B9A588@gmail.com> <25A37A53-DD48-4E34-ABD7-1BACECCD8CEC@gmail.com> <864j99d2vr.fsf@mail.linkov.net> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18092"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71681@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 01 09:03:23 2024 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 1sOB4N-0004UO-1O for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Jul 2024 09:03:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sOB49-0004Qd-0X; Mon, 01 Jul 2024 03:03:09 -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 1sOB43-0004P5-8G for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2024 03:03: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 1sOB42-0003i2-CH for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2024 03:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sOB42-0007Ug-E1 for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2024 03:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Jul 2024 07:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71681 X-GNU-PR-Package: emacs Original-Received: via spool by 71681-submit@debbugs.gnu.org id=B71681.171981735928775 (code B ref 71681); Mon, 01 Jul 2024 07:03:02 +0000 Original-Received: (at 71681) by debbugs.gnu.org; 1 Jul 2024 07:02:39 +0000 Original-Received: from localhost ([127.0.0.1]:59966 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sOB3e-0007U3-OF for submit@debbugs.gnu.org; Mon, 01 Jul 2024 03:02:39 -0400 Original-Received: from mail-pg1-f178.google.com ([209.85.215.178]:59393) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sOB3c-0007Tu-DA for 71681@debbugs.gnu.org; Mon, 01 Jul 2024 03:02:36 -0400 Original-Received: by mail-pg1-f178.google.com with SMTP id 41be03b00d2f7-71816f36d4dso1824863a12.2 for <71681@debbugs.gnu.org>; Mon, 01 Jul 2024 00:02:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719817295; x=1720422095; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=MAu6OgNmIwSZ8omzF83NvZviP4u5hA+Mc6NVTwZKjoc=; b=OwxA1Bd6DNe9DUYf1/jVe+U8FM8Xv1HtSY/r+xTKeXir8yN6HNpEcHz9xkw5u53DPC rZcuGgHsmK+9dex67ZbPcnsKsgkh8KzqrofZux6w32iSAjRor4vt06q4yBs52c5blYm1 5WjrJYWs4erbCyPo8Lq+vCu1ExibXDrVD7Sy6JjehJ7AvEjM3F80WuGeWi7CQJDs9FkZ QCllmN9hrQGYMz/ZPT69DKzbMWQ6d+G34EjhuCnLiYZI91nfOZMn9mYt/6VDwRJLnjn4 mhK+7stOdtMsDDqyCU5loH4h934/ba7Z9V0Pvg6W2X7eJ0+ccU2OVW5x9wY3S0peE/jn dsaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719817295; x=1720422095; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MAu6OgNmIwSZ8omzF83NvZviP4u5hA+Mc6NVTwZKjoc=; b=lhVLqoEBDn5TBokhPiWKsS44gcQ5iPpWtVALsJDZyo1Jun5sbnOZkUznPhyERiasRO sK8XS6tY4qHtxAbBD+2FIA7hJbL4CGKBmeg0xhSqHm9SikFJf9TFSs/NCdWolXBnBEj5 OD7RVERnsDyve0qFyw/mfF0OXCDChF8l2txgDMMSr9FqFrSCv9IIXb2V521Vq/308g8P EsuZmcWAsnthdep2LJXb6TOKYmZcgjCH4jdC2xRhk8AMR6fiPD/LiPdJiM6zVFWwHsy6 b55dllIjxtw/tcvJN4IpDCp5zRa7rTQNb9F1uaZBQ7xMO6qoxzoNvIfGZzONu99l+8La wgyA== X-Gm-Message-State: AOJu0YwJN61YtDn8kgVFuPkcXw3tlKjrwdShHygBTXpcBuWuLqZkiuYP CrQhlm6CZe2w3wAgPYdbSJv6e2TO5pdQUo9siUuiBRdtskqKxWvP X-Google-Smtp-Source: AGHT+IFYvP0m+5Z8+3pJNvGjiYG5hNNycS6Nmt+ZJMC43Am32zdWJEZO5MnssEr5Ey2I3EG11DZ8JQ== X-Received: by 2002:a05:6a21:6d96:b0:1be:ca24:964c with SMTP id adf61e73a8af0-1bef6109d5bmr8796715637.16.1719817294806; Mon, 01 Jul 2024 00:01:34 -0700 (PDT) Original-Received: from smtpclient.apple ([2601:646:8f81:6120:f93d:4f92:d77e:eed7]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70804a89fc9sm5710477b3a.212.2024.07.01.00.01.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Jul 2024 00:01:34 -0700 (PDT) In-Reply-To: <864j99d2vr.fsf@mail.linkov.net> X-Mailer: Apple Mail (2.3774.600.62) 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:288237 Archived-At: > On Jun 30, 2024, at 11:49=E2=80=AFPM, Juri Linkov = wrote: >=20 >> I reduced the crash to a signal and pushed the fix to emacs-30. >> Next I=E2=80=99ll make sure the signal is properly handled. >=20 > Now with the latest emacs-30 at the commit b2c966f8396 > there is another problem: >=20 > 0. emacs -Q > 1. eval: (setq backtrace-on-redisplay-error t) > 2. eval: (add-to-list 'major-mode-remap-alist '(c-mode . c-ts-mode)) > 3. C-x v L > 4. in the *vc-change-log* buffer move point to the commit b2c966f8396 > 5. type D >=20 > Warning (error): Error in a redisplay Lisp hook. > See buffer *Redisplay-trace* >=20 > Error: treesit-node-outdated (#) > treesit--font-lock-fontify-region-1(# = # 99654 99975 nil nil) > treesit-font-lock-fontify-region(99654 99975 nil) > font-lock-fontify-syntactically-region(99654 99975 nil) > font-lock-default-fontify-region(99654 99974 nil) > font-lock-fontify-region(99654 99974) > font-lock-ensure(99654 99974) > diff-syntax-fontify-hunk(122 539 t) > diff-syntax-fontify(122 539) > diff--font-lock-syntax(539) > font-lock-fontify-keywords-region(1 539 nil) > font-lock-default-fontify-region(1 539 nil) > font-lock-fontify-region(1 539) > jit-lock--run-functions(1 539) > jit-lock-fontify-now(1 539) > jit-lock-function(1) > vc-diff-finish(# nil nil) > vc-exec-after(#f(compiled-function () #)) > log-view-diff-common(1 1 t) > log-view-diff-changeset(1 1) > funcall-interactively(log-view-diff-changeset 1 1) > command-execute(log-view-diff-changeset) Yes, that=E2=80=99s what meant by =E2=80=9Creduced crash to signal=E2=80=9D= . The crash is fixed, but I need to fix the font-lock code so it can = handle the signal gracefully (or don=E2=80=99t cause the signal from the = first place). It=E2=80=99s not yet clear to me why does = treesit-font-lock-fontify-region end up using an outdated node for = query. Yuan=