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#61514: 30.0.50; sadistically long xml line hangs emacs Date: Mon, 20 Feb 2023 15:14:07 +0200 Message-ID: <83h6vgv5r4.fsf@gnu.org> References: <87lel0c65v.fsf@everybody.org> <838rgvymcd.fsf@gnu.org> <886c06e50e9cfacb7954@heytings.org> <83h6vixik1.fsf@gnu.org> <886c06e50e707ab83560@heytings.org> <886c06e50e876183758c@heytings.org> <83zg98v7qs.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17421"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mah@everybody.org, 61514@debbugs.gnu.org, monnier@iro.umontreal.ca To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 20 14:15:18 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 1pU60j-0004GH-B3 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Feb 2023 14:15:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU60W-0001Z7-2h; Mon, 20 Feb 2023 08:15: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 1pU60U-0001Yb-Sn for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2023 08:15: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 1pU60U-00068x-IY for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2023 08:15:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pU60U-0002OZ-6R for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2023 08:15:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Feb 2023 13:15: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.16768988599125 (code B ref 61514); Mon, 20 Feb 2023 13:15:02 +0000 Original-Received: (at 61514) by debbugs.gnu.org; 20 Feb 2023 13:14:19 +0000 Original-Received: from localhost ([127.0.0.1]:50960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pU5zn-0002N7-3H for submit@debbugs.gnu.org; Mon, 20 Feb 2023 08:14:19 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40694) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pU5zk-0002Mt-Lm for 61514@debbugs.gnu.org; Mon, 20 Feb 2023 08:14:17 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU5zc-00061K-TT; Mon, 20 Feb 2023 08:14:09 -0500 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=xowdDwSSDWWTkRVqSs2TFHeqrXDM2kSat5Gq/W0t5jc=; b=fwUybk22yex+ bTtmG52gxmQJdmhzo6w1f/fnV5DzsjEchTnFyvk89QVMZbhBDKI7+IfS+k0AGXcRf4YDrVt11EBgb b0fe12SpItZVLv/9GEGY4VcfYm9MVI9O7K+KT2BD8EUKXs1VseL8pjnrbgVQcpux9b+MKyYIEwNab /CkNF0BE7zpKMl8DjpnEiabbIkUqtLU3QTRkt1+9TBQNNeaoujt2xowHjYmikgLJRZIRbq37DK/Zm +2ki4MNGbAocBXP3OSfQ3pLqoQslCfbIk7Xh6oLnnTbOOBfK8lh9Sh74DtZ9Wn1mwnJzOHeIewGgW zU8Jbs2MvSvCgximp6WyRA==; Original-Received: from [87.69.77.57] (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 1pU5zY-0005nq-0F; Mon, 20 Feb 2023 08:14:08 -0500 In-Reply-To: (message from Gregory Heytings on Mon, 20 Feb 2023 12:40:54 +0000) 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:256168 Archived-At: > Date: Mon, 20 Feb 2023 12:40:54 +0000 > From: Gregory Heytings > cc: mah@everybody.org, 61514@debbugs.gnu.org, monnier@iro.umontreal.ca > > >> BTW, this makes me wonder why emacs_re_max_failures is not accessible > >> from Elisp. I think it would be very useful, if only for debugging > >> purposes. And perhaps let-binding it to a lower value around some > >> potentially (or actually) problematic regexps would be a good way to > >> prevent or fix bugs such as the current one. > > > > If we know which regexps cause problems, shouldn't we instead fix those > > regexps, or change how we use them? > > > > If we know how and where to fix them, that's better of course. If we > don't (and frankly when I look at that regexp I have no idea how it could > be fixed), limiting the backtracking depth to a more reasonable value is > better than not fixing the bug. So let's try fixing the issue that way first, and only fall back to "limiting failures" if we decide we failed with that. > > For debugging purposes, you can set the value in the debugger after > > starting Emacs, or with a breakpoint just before calling the problematic > > code. > > That's only true for the (very) few of us who are comfortable building > Emacs and running it under GDB (and even for them it's much easier to just > change the value with a setq). If regexp-max-backtracking-depth had been > present, everyone could easily have tried to set it to some lower value. I don't trust people who don't build Emacs and run it under GDB to use such a variable judiciously.