From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#61215: 29.0.60; font-lock broken in diff-mode with long lines Date: Thu, 02 Feb 2023 19:16:34 +0200 Organization: LINKOV.NET Message-ID: <86o7qcf2x5.fsf@mail.linkov.net> References: <86lelh6yhq.fsf_-_@mail.linkov.net> <83cz6tz12b.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29488"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 61215@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 02 18:18:24 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 1pNdE7-0007To-OD for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Feb 2023 18:18:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNdDv-0000X3-5C; Thu, 02 Feb 2023 12:18:13 -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 1pNdDm-0000T9-VC for bug-gnu-emacs@gnu.org; Thu, 02 Feb 2023 12:18:08 -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 1pNdDm-000074-6w for bug-gnu-emacs@gnu.org; Thu, 02 Feb 2023 12:18:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pNdDm-0002x8-1m for bug-gnu-emacs@gnu.org; Thu, 02 Feb 2023 12:18:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Feb 2023 17:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61215 X-GNU-PR-Package: emacs Original-Received: via spool by 61215-submit@debbugs.gnu.org id=B61215.167535822211267 (code B ref 61215); Thu, 02 Feb 2023 17:18:02 +0000 Original-Received: (at 61215) by debbugs.gnu.org; 2 Feb 2023 17:17:02 +0000 Original-Received: from localhost ([127.0.0.1]:35664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNdCo-0002vY-EN for submit@debbugs.gnu.org; Thu, 02 Feb 2023 12:17:02 -0500 Original-Received: from relay11.mail.gandi.net ([217.70.178.231]:48993) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNdCn-0002vD-6w for 61215@debbugs.gnu.org; Thu, 02 Feb 2023 12:17:01 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 4D5CC10000F; Thu, 2 Feb 2023 17:16:53 +0000 (UTC) In-Reply-To: <83cz6tz12b.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 01 Feb 2023 20:35:08 +0200") 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:254674 Archived-At: >> >> when there is at least one long line near the end of >> >> a diff-mode buffer, then sometimes the buffer gets truncated, >> >> 'diff-hunk-file-names' returns nil on diff headings, >> >> and there are a lot of such errors in the Messages buffer: >> >> >> >> Error during redisplay: (jit-lock-function 1) signaled (args-out-of-range # 1118 1370) >> > >> > We can and should fix this and other problems, but only if they are >> > reported. Would you please file a bug report for any such problem you >> > find? >> >> This is a new bug report created from bug#56682. > > Thanks. Can you post a recipe for reproducing that, preferably > starting from "emacs -Q"? 0. emacs -Q 1. Set debug-on-error and backtrace-on-redisplay-error to t 2. Create a commit with some diff hunks in a prog mode at the beginning, and a single-line 1MB file added at the end; 3. From *vc-change-log* type `d' on that commit that opens *vc-diff* buffer 4. Scroll the *vc-diff* buffer It displays an error in the *Warning* buffer: ⛔ Warning (error): Error in a redisplay Lisp hook. See buffer *Redisplay_trace* And *Redisplay_trace* contains: Error: args-out-of-range (# 2000 251555) mapbacktrace(#f(compiled-function (evald func args flags) #)) debug-early-backtrace() debug-early(error (args-out-of-range # 2000 251555)) buffer-substring-no-properties(2000 251555) diff-syntax-fontify-hunk(2000 251555 nil) diff-syntax-fontify(2000 251555) #(2000 251555) diff--iterate-hunks(10000 #) diff--font-lock-syntax(10000) font-lock-fontify-keywords-region(1527 10000 nil) font-lock-default-fontify-region(1527 3027 nil) font-lock-fontify-region(1527 3027) #f(compiled-function (fun) #)(font-lock-fontify-region) run-hook-wrapped(#f(compiled-function (fun) #) font-lock-fontify-region) jit-lock--run-functions(1527 3027) jit-lock-fontify-now(1527 3027) jit-lock-function(1527) redisplay_internal\ \(C\ function\)()