From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#61514: 30.0.50; sadistically long xml line hangs emacs Date: Sun, 19 Feb 2023 18:12:05 -0500 Message-ID: References: <87lel0c65v.fsf@everybody.org> <838rgvymcd.fsf@gnu.org> <886c06e50e9cfacb7954@heytings.org> <83h6vixik1.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5316"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Gregory Heytings , 61514@debbugs.gnu.org, mah@everybody.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 20 00:13:21 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 1pTsrx-0001ER-B7 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Feb 2023 00:13:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pTsrg-0005td-FZ; Sun, 19 Feb 2023 18:13:04 -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 1pTsre-0005sw-Ji for bug-gnu-emacs@gnu.org; Sun, 19 Feb 2023 18:13:02 -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 1pTsre-0005vR-Aq for bug-gnu-emacs@gnu.org; Sun, 19 Feb 2023 18:13:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pTsre-000298-0y for bug-gnu-emacs@gnu.org; Sun, 19 Feb 2023 18:13:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 Feb 2023 23:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61514 X-GNU-PR-Package: emacs Original-Received: via spool by 61514-submit@debbugs.gnu.org id=B61514.16768483398192 (code B ref 61514); Sun, 19 Feb 2023 23:13:01 +0000 Original-Received: (at 61514) by debbugs.gnu.org; 19 Feb 2023 23:12:19 +0000 Original-Received: from localhost ([127.0.0.1]:49929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTsqx-000283-GV for submit@debbugs.gnu.org; Sun, 19 Feb 2023 18:12:19 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:45319) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTsqv-00027k-1b for 61514@debbugs.gnu.org; Sun, 19 Feb 2023 18:12:17 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 3164E100099; Sun, 19 Feb 2023 18:12:11 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 86626100048; Sun, 19 Feb 2023 18:12:09 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1676848329; bh=L7UULHxRAwNSP6C4hmuGpOCg86USE6OlAKp9lFpQs68=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=fPXRaYFTWsM5SKZEjuXV3WMMdOWFxV7bi8m9tk86ltMntGaz/OEsJzJlw7CUovlOh 7jKm9QEjxUxz5xL2ZSLK21up4cuUpJ1mQD0NIePon/NSL8DfiK1HcqJDXV1bVuNSkC UQPzfn6CGfGqCRRO1uk0cxa8miaD7xvSzC5Z1clCM2rtIps0zA2qJgvr6vyStIS9gG /44m8nRlAZemiHj5qe+/HMd90obKEAaLhYcb/vCghR8sV4FYU8RDoeMa6Po8kXer+T XWgtsgQbqdgkkF5sAqWCcvU+txN9pL0ih8/lEuvNDW2Wv/C/xyc9PUDPRt6ea8LDS3 SdPB4Wgh+bnyQ== Original-Received: from pastel (unknown [216.154.34.24]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 3040B1231B4; Sun, 19 Feb 2023 18:12:09 -0500 (EST) In-Reply-To: <83h6vixik1.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 19 Feb 2023 08:42:22 +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:256114 Archived-At: > I'm not surprised. There's something weird going on there. Do you > understand the logic in this snippet near the end of > re_match_2_internal: I should understand it, because I think I wrote (or at least significantly changed) this part (20 years ago, maybe?). > /* We goto here if a matching operation fails. */ > fail: > maybe_quit (); > if (!FAIL_STACK_EMPTY ()) > { > [...] > } > else > break; /* Matching at this starting point really fails. */ > } /* for (;;) */ > > if (best_regs_set) > goto restore_best_regs; > > unbind_to (count, Qnil); > SAFE_FREE (); > > if (max_redisplay_ticks > 0 && nchars > 0) > update_redisplay_ticks (nchars / 50 + 1, NULL); > > return -1; /* Failure to match. */ > > What is the mechanism to empty the failure stack, which eventually > causes us to report a failure? It's `POP_FAILURE_POINT` done soon after testing `FAIL_STACK_EMPTY`. > Maybe we should devise some mechanism whereby re_match_2_internal > forcibly returns a failure after too much bactracking (if that is what > happens here), when called from redisplay? > > Stefan, any ideas? I don't understand the problem well enough yet, sorry. Stefan