From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: (error "Stack overflow in regexp matcher") and (?)wrong display of regexp in backtrace Date: Sun, 15 Mar 2020 12:35:04 -0400 Message-ID: References: <20200315103922.GA4928@ACM> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="71578"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 15 17:37:47 2020 Return-path: Envelope-to: ged-emacs-devel@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 1jDWGo-000IWZ-Hj for ged-emacs-devel@m.gmane-mx.org; Sun, 15 Mar 2020 17:37:46 +0100 Original-Received: from localhost ([::1]:55964 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jDWGn-0003yn-F2 for ged-emacs-devel@m.gmane-mx.org; Sun, 15 Mar 2020 12:37:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41522) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jDWEJ-0002sA-Th for emacs-devel@gnu.org; Sun, 15 Mar 2020 12:35:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jDWEH-0002kq-M4 for emacs-devel@gnu.org; Sun, 15 Mar 2020 12:35:10 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:3057) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jDWEG-0002bs-HD for emacs-devel@gnu.org; Sun, 15 Mar 2020 12:35:09 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 99BD2100BDE; Sun, 15 Mar 2020 12:35:07 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 506C41000F2; Sun, 15 Mar 2020 12:35:05 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1584290105; bh=Wd+Sp7hpjTlrR82szwnhOyPNf+0fS9u0EyuA3kFIxcs=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=ZFZVfajtimhrvnANdBx6lWv1y81mR/RPbqs0r6XTY8J0GNIaesXUcBALIYAPnbXtM 3fA/9Oq/pgMAuy2ZY3mykKeKW9q0w+8XClNUVOba1qVxs6w3rKG5V67RHmGqCeP/LR dFKyp+pOxNElmHR6EMIgaAVOxjYuHoN/5ccR1ZuolaT7tUNeTXAtGgJ/8MKeM1cn6Z rz3VZcTYVKgCWdAu1a5nfDDlJSjj4Ez8mdBc+6CGxwXcZV/hfX/hrkmQo843DuPGxZ A3wIDZY6hRXbfX16ZfBKAch/1FTote1NxMnAPGZcnv5V9647FRrc5NFotXZi3cUXTP mROAhCzq0lm+g== Original-Received: from pastel (unknown [216.154.50.221]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 05745120287; Sun, 15 Mar 2020 12:35:04 -0400 (EDT) In-Reply-To: <20200315103922.GA4928@ACM> (Alan Mackenzie's message of "Sun, 15 Mar 2020 10:39:22 +0000") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:245536 Archived-At: > First of all, note the regexp, "\\(\\\\\\(.\\|\n\\)\\|[^\\\n\15]\\)*" > ^^^ > In the source, the "\15" is "\r". Why is this substitution being made > for the backtrace? The string doesn't keep track of whether it was written in the source code as "\r" or "\^M" or with the actual ^M character or with "\015" etc... so it's no wonder the printout is not exactly the same as what you had in the source. I do wonder why it says \15 instead of \015, \r, or something else: I've almost never seen 2-digit-long octal for chars, (only single-digit for NUL and 3-digit for other things), so it's admittedly a poor choice. Stefan