From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#61298: Emacs 29.0.60: font-lock throws an args-out-of-range error with a long line. Date: Sun, 5 Feb 2023 16:04:05 +0000 Message-ID: References: <83v8kgqh79.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2157"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61298-done@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 05 17:05:55 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 1pOhWZ-00007E-QY for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Feb 2023 17:05:51 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pOhVr-00031b-RF; Sun, 05 Feb 2023 11:05:08 -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 1pOhVm-00030y-UK for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2023 11:05:03 -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 1pOhVm-0007oy-DS for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2023 11:05:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pOhVl-00045x-SX for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2023 11:05:01 -0500 Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Feb 2023 16:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 61298 X-GNU-PR-Package: emacs Mail-Followup-To: 61298@debbugs.gnu.org, acm@muc.de, acm@muc.de Original-Received: via spool by 61298-done@debbugs.gnu.org id=D61298.167561305615678 (code D ref 61298); Sun, 05 Feb 2023 16:05:01 +0000 Original-Received: (at 61298-done) by debbugs.gnu.org; 5 Feb 2023 16:04:16 +0000 Original-Received: from localhost ([127.0.0.1]:46311 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pOhV1-00044o-ON for submit@debbugs.gnu.org; Sun, 05 Feb 2023 11:04:16 -0500 Original-Received: from mx3.muc.de ([193.149.48.5]:34052) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pOhV0-00044b-2Q for 61298-done@debbugs.gnu.org; Sun, 05 Feb 2023 11:04:14 -0500 Original-Received: (qmail 22790 invoked by uid 3782); 5 Feb 2023 17:04:07 +0100 Original-Received: from acm.muc.de (p4fe1529c.dip0.t-ipconnect.de [79.225.82.156]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 05 Feb 2023 17:04:07 +0100 Original-Received: (qmail 23424 invoked by uid 1000); 5 Feb 2023 16:04:05 -0000 Content-Disposition: inline In-Reply-To: <83v8kgqh79.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de 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:254869 Archived-At: Hello, Eli. On Sun, Feb 05, 2023 at 17:12:42 +0200, Eli Zaretskii wrote: > > Date: Sun, 5 Feb 2023 14:54:35 +0000 > > From: Alan Mackenzie > > Error: args-out-of-range (260028 260028) > > mapbacktrace(#f(compiled-function (evald func args flags) #)) > > debug-early-backtrace() > > debug-early(error (args-out-of-range 260028 260028)) <=============== > > get-text-property(260028 font-lock-multiline) > > font-lock-extend-region-multiline() > > font-lock-default-fontify-region(1 260029 nil) > > c-font-lock-fontify-region(1 1501 nil) > > font-lock-fontify-region(1 1501) > > #f(compiled-function (fun) #)(font-lock-fontify-region) > > run-hook-wrapped(#f(compiled-function (fun) #) font-lock-fontify-region) > > jit-lock--run-functions(1 1501) > > jit-lock-fontify-now(1 1501) > > jit-lock-function(1) > > redisplay_internal\ \(C\ function\)() > > This is clearly a bug. > > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > > Position 260028 is within the bounds of the buffer. It would appear > > that the new-ish long-lines code has narrowed the buffer at some stage > > such that point-max is less than the end of the buffer. I propose the > > following simple patch which fixes (or works around) this bug: > Fine with me, please install on the emacs-29 branch, and thanks. I have done so, and I'm closing the bug with this post. Thanks for such a rapid response. -- Alan Mackenzie (Nuremberg, Germany).