From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#57804: An infinite loop in a `fontify-region' function causes Emacs to hang indefinitely Date: Thu, 15 Sep 2022 22:16:36 +0000 Message-ID: References: <2b58b8f5429a6e3aecda@heytings.org> <834jx85tyv.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23513"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 57804@debbugs.gnu.org, Lars Ingebrigtsen To: Paul Pogonyshev Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 16 00:17:22 2022 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 1oYxAe-0005rG-Oa for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 16 Sep 2022 00:17:21 +0200 Original-Received: from localhost ([::1]:59416 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYxAd-0003YS-78 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Sep 2022 18:17:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44382) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYxAN-0003Y6-4G for bug-gnu-emacs@gnu.org; Thu, 15 Sep 2022 18:17:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42505) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oYxAM-0001zN-SU for bug-gnu-emacs@gnu.org; Thu, 15 Sep 2022 18:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oYxAM-000135-9h for bug-gnu-emacs@gnu.org; Thu, 15 Sep 2022 18:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Sep 2022 22:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57804 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix Original-Received: via spool by 57804-submit@debbugs.gnu.org id=B57804.16632802013994 (code B ref 57804); Thu, 15 Sep 2022 22:17:02 +0000 Original-Received: (at 57804) by debbugs.gnu.org; 15 Sep 2022 22:16:41 +0000 Original-Received: from localhost ([127.0.0.1]:59437 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYxA0-00012M-NJ for submit@debbugs.gnu.org; Thu, 15 Sep 2022 18:16:41 -0400 Original-Received: from heytings.org ([95.142.160.155]:43280) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYx9y-00012D-N3 for 57804@debbugs.gnu.org; Thu, 15 Sep 2022 18:16:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1663280197; bh=ULBVQJUYdopx/sUgsjCfZ7pjQc+OibTEnCmPKhz//wE=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=v6zOGxuKjVdto8pJIO7C9MQHCZq15BypOmFgJg+nh27KoxuvLyjNLotUuQZhNnkjm 6a25vou8aRMNKpjx29WpDxAD6NAcUANyR1WkcUHab+Ry9Ec8gYzLyd3cGvt8Yv+obx +dmGhYSeWt4+OrGz+jWnVkNpLP6uCZ8UXvnpbGzU7R4NG1Q6iLDV0ee/YcylxTZOYo siBr+JGmzpNH2ut68upNIid/VjhvXzSekvn333i6WSB2GTUElZfd6MMpcHHKUOOAxD lXJOridtzxRZx6ZDhKSM5SZGMXq1NcR3EJxDaASGgIbpQeWCN8TseUi5YFzfSTcSNl 3nopa5TkC9hZw== In-Reply-To: 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" Xref: news.gmane.io gmane.emacs.bugs:242656 Archived-At: > > I don't know why, this is a hypothetical, but fairly realistic > situation, right? > Discussing hypothetical issues leads nowhere, according to my experience. Let's focus on actual issues. > > Now, let's say function `logview-do-bla-bla-bla' cannot work with > narrowed buffer (half of functions in Logview cannot). > You said I'm not allowed to tell you that your code could do things differently, but that doesn't mean it isn't true. It is for example possible to parse the buffer outside of fontification-functions and to use the result of that parsing inside fontification-functions. Yet another method would be to use a simpler fontification method in buffers with too long lines. Yet another method would be to turn font locking off in buffers with too long lines. Yet another method would be to truncate too long lines. I also cannot understand why it is necessary, in log files in which all lines are independent, to move beyond the beginning and end of a line to decide how it must be fontified. > > Will I be able to lift locked narrowing restrictions without knowing the > tag? > This is akin to a security mechanism, there is no reason to make it possible to turn it off "too easily".