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:38:52 -0500 Message-ID: References: <87lel0c65v.fsf@everybody.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="11718"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 61514@debbugs.gnu.org To: "Mark A. Hershberger" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 20 00:40:23 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 1pTtI6-0002nU-80 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Feb 2023 00:40:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pTtHo-000254-TD; Sun, 19 Feb 2023 18:40: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 1pTtHn-00024Y-O6 for bug-gnu-emacs@gnu.org; Sun, 19 Feb 2023 18:40: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 1pTtHn-0002eI-Dr for bug-gnu-emacs@gnu.org; Sun, 19 Feb 2023 18:40:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pTtHm-0002qZ-OV for bug-gnu-emacs@gnu.org; Sun, 19 Feb 2023 18:40: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:40:02 +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.167684994510869 (code B ref 61514); Sun, 19 Feb 2023 23:40:02 +0000 Original-Received: (at 61514) by debbugs.gnu.org; 19 Feb 2023 23:39:05 +0000 Original-Received: from localhost ([127.0.0.1]:49945 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTtGq-0002pE-MY for submit@debbugs.gnu.org; Sun, 19 Feb 2023 18:39:04 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:46829) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTtGn-0002oa-MI for 61514@debbugs.gnu.org; Sun, 19 Feb 2023 18:39:02 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 0882F100099; Sun, 19 Feb 2023 18:38:55 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 962A4100048; Sun, 19 Feb 2023 18:38:53 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1676849933; bh=lOiXsXp9AKWdgxddbmOSCia/qIA5x76wAHhWg0S4X2Q=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Z4nvZ8iBh4gu8dd9uW/gO6pF5aGFIe66Q8VrpjULIebUNLCes3HOc/ZjqMU/3Iw2H KemvGGmw0VmkCJj/ES9kWRPaaoUfxGiD06SPSWVl3el/UkuCxY5bG/32dHfEpFHLHv Do8F/SeYt6kmsTtixYuNoxkcrTmT0y25MJ5Wpakg8whMO9L0RyAJCrSa5o5l0pL9VQ AxybPyThhLTIl3RFNq29k8gZi0K8T+bgO0XHKfANp5LQOROdce9RmjVtBo7GZyjFcv GoU1fWpC5CXlOs3afXU6f06wbbj1rXeDmzKwHWHWC5SZYCLkXXLJqeXL6jHahbqdf/ mPStJWSFL6hWA== Original-Received: from pastel (unknown [216.154.34.24]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4620B123173; Sun, 19 Feb 2023 18:38:53 -0500 (EST) In-Reply-To: <87lel0c65v.fsf@everybody.org> (Mark A. Hershberger's message of "Tue, 14 Feb 2023 16:02:04 -0500") 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:256115 Archived-At: > Opening the file (a.xml) produced by the script above from a dired > buffer in Emacs 30.0.50 shows the following in the message window: > > RNG NXML error: (error "Stack overflow in regexp matcher") That's "good": much better than a freeze. It points to the use of a regexp pattern somewhere which doesn't fall into the small subset which our regexp engine handles efficiently, in which case we get typically one stack element pushed per character, so if the text is long enough we inevitably bump into the limit of our regexp-stack depth. We should look at the regex and try to rewrite it in a way that fits better within the limits of our regexp matcher. > After this, Emacs appears to hang and nothing else is displayed. That's a second and separate bug (tho probably triggered by the first). These tend to be nastier to diagnose. It may also come from a poor regexp (except one where the problem is not just the backtracking depth but the resulting algorithmic complexity which can be up to exponential :-( ), but not necessarily. > Bottom line: Emacs 30 is handling files with long lines worse than Emacs 28. :-) As you may have seen by now, this just triggers defensive reactions. Stefan