From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#57804: An infinite loop in a `fontify-region' function causes Emacs to hang indefinitely Date: Wed, 14 Sep 2022 20:02:30 +0300 Message-ID: <834jx93n4p.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13190"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57804@debbugs.gnu.org To: Paul Pogonyshev Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 14 19:25:24 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 1oYW8Z-0003I6-IM for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Sep 2022 19:25:23 +0200 Original-Received: from localhost ([::1]:44574 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYW8Y-0006OO-HT for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Sep 2022 13:25:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52216) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYVn3-0003Ja-QF for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2022 13:03:09 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39021) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oYVmx-0004iP-1J for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2022 13:03:09 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oYVmw-00066s-ST for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2022 13:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Sep 2022 17:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57804 X-GNU-PR-Package: emacs Original-Received: via spool by 57804-submit@debbugs.gnu.org id=B57804.166317497023452 (code B ref 57804); Wed, 14 Sep 2022 17:03:02 +0000 Original-Received: (at 57804) by debbugs.gnu.org; 14 Sep 2022 17:02:50 +0000 Original-Received: from localhost ([127.0.0.1]:55950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYVmj-00066B-SE for submit@debbugs.gnu.org; Wed, 14 Sep 2022 13:02:50 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42090) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYVmf-00065f-FI; Wed, 14 Sep 2022 13:02:45 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:33858) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYVma-0004cm-9e; Wed, 14 Sep 2022 13:02:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=uA1pvlMpUEAPYTfa5LsyOt25rBjbGqJJG4SDSnhHbBw=; b=VhKeFtTDkMyF Sarzrt63nu1ovKoXbXSfAOQKKIUxqzrD+ZpPEPujQVxvF28PjURViHRfd62QMuO3uAN2znXfRBM3x 9N3iKnrMXsh5rgGV3JICVSwxV/FTq3h34lOUzKzCvNvgGP2588KImJIoSTu6IDVFhTSSJNqeV918C sxK0Wd0CKvcMIgtyBiR0rBgPQqq6JFxERQraXcfI/TlXDuSuqoavYDcwdnIQl+H3S7wh5fg9W5u4u 94j80T+137dCe8J8kO7LOOGf8833xH84tdq5SwNJymuDzENfybO4tTIu+/UrAIxe9mT3hpMqArPGo jonkgd24wW+KPEHG3PrVgw==; Original-Received: from [87.69.77.57] (port=2583 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYVmZ-0003iO-MR; Wed, 14 Sep 2022 13:02:40 -0400 In-Reply-To: (message from Paul Pogonyshev on Wed, 14 Sep 2022 17:05:54 +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" Xref: news.gmane.io gmane.emacs.bugs:242489 Archived-At: tags 57804 wontfix close 57804 thanks > From: Paul Pogonyshev > Date: Wed, 14 Sep 2022 17:05:54 +0200 > > To reproduce, save the attachment as `font-lock-hangs.el' and execute: > > $ emacs -Q -l font-lock-hangs.el > > C-g doesn't help anymore. The only thing you can do is to kill and start Emacs anew. > > Git commit fd1ee05977. > > To quote a discussion from another bug, the reply is from Eli Zaretski: > > > > By the way, it would really be nice if Emacs could do something about hangs irrespective of what > causes > > > that. Even if Elisp code is buggy, Emacs itself should never allow it to fall into an infinite loop and stop > > > responding to C-g, leaving full restart as the only way out. > > > > I think that's impossible in general, unless we restrict what Lisp > > programs can do. Every programming language can be used to write a > > buggy program. > > > > However, it should be possible to prevent some cases of such > > problematic behavior, certainly so when the infloop is caused by our > > bug. But for that we need to know the details of the specific case in > > order to investigate. This case is exactly one of those which I think we shouldn't try to fix, because it's the case of "buggy Lisp program", a.k.a. "don't do that". There's no reason for any useful Lisp program to have an infloop like this: > (while t > "whoopsie") So I'm closing this bug as "wontfix".