From: Paul Eggert <eggert@cs.ucla.edu>
To: "Carlo Marcelo Arenas Belón" <carenas@gmail.com>,
"René Scharfe" <l.s.r@web.de>
Cc: git@vger.kernel.org, "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"GNU grep developers" <grep-devel@gnu.org>
Subject: Re: improve performance of PCRE2 bug 2642 bug workaround
Date: Tue, 22 Mar 2022 21:06:39 -0700 [thread overview]
Message-ID: <3642dffd-2241-9fd4-3ab8-04ce14c0f1a8@cs.ucla.edu> (raw)
In-Reply-To: <20220323010931.jzf7op7hdusdty33@carlos-mbp.lan>
[-- Attachment #1: Type: text/plain, Size: 533 bytes --]
On 3/22/22 18:09, Carlo Marcelo Arenas Belón wrote:
> AFAIK the contents of the bugzilla are no longer accessible to anyone (lost in the migration of PCRE2 to github),
Yes, that confused me too.
> the bug will trigger when both PCRE2_UTF and PCRE2_MULTILINE are set (as shown in the PCRE2 regression added), with the later set by default in git and NEVER set in GNU grep, hence why I later retracted[6] my suggestion to add the workaround to grep
OK, thanks, I installed the attached to GNU grep and we'll call it a day.
[-- Attachment #2: 0001-grep-Remove-recent-PCRE2-bug-workarounds.patch --]
[-- Type: text/x-patch, Size: 1331 bytes --]
From 743b1f6f5ca7ee86348fa0593da2eff03df1a82a Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Tue, 22 Mar 2022 20:12:38 -0700
Subject: [PATCH] grep: Remove recent PCRE2 bug workarounds
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* src/pcresearch.c (Pcompile): Remove recent workaround for PCRE2
bugs; apparently it’s not needed. This reverts back to where
things were before today. Suggested by Carlo Arenas in:
https://lists.gnu.org/r/grep-devel/2022-03/msg00006.html
---
src/pcresearch.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/src/pcresearch.c b/src/pcresearch.c
index 6947838..f332a44 100644
--- a/src/pcresearch.c
+++ b/src/pcresearch.c
@@ -157,13 +157,6 @@ Pcompile (char *pattern, idx_t size, reg_syntax_t ignored, bool exact)
#endif
}
-#if defined PCRE2_MATCH_INVALID_UTF && !(10 < PCRE2_MAJOR + (36 <= PCRE2_MINOR))
- /* Work around PCRE2 bug 2642, and another bug reportedly fixed in
- PCRE2 commit e0c6029a62db9c2161941ecdf459205382d4d379. */
- if (flags & (PCRE2_UTF | PCRE2_CASELESS))
- flags |= PCRE2_NO_START_OPTIMIZE;
-#endif
-
/* FIXME: Remove this restriction. */
if (rawmemchr (pattern, '\n') != patlim)
die (EXIT_TROUBLE, 0, _("the -P option only supports a single pattern"));
--
2.32.0
next prev parent reply other threads:[~2022-03-23 4:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-22 16:38 improve performance of PCRE2 bug 2642 bug workaround Paul Eggert
2022-03-22 20:26 ` René Scharfe
2022-03-22 21:12 ` Paul Eggert
2022-03-23 1:09 ` Carlo Marcelo Arenas Belón
2022-03-23 4:06 ` Paul Eggert [this message]
2022-03-23 18:37 ` René Scharfe
2022-03-23 20:24 ` Carlo Arenas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3642dffd-2241-9fd4-3ab8-04ce14c0f1a8@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=avarab@gmail.com \
--cc=carenas@gmail.com \
--cc=git@vger.kernel.org \
--cc=grep-devel@gnu.org \
--cc=l.s.r@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).