grep-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grep branch, master, updated. v3.7-58-g0ca5dcc


From: Paul Eggert
Subject: grep branch, master, updated. v3.7-58-g0ca5dcc
Date: Tue, 22 Mar 2022 12:18:43 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  0ca5dcc1c57bcd24ea18628444340faff222ef64 (commit)
      from  70fc166b38933e73a45d5348634e626809a7bd32 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=0ca5dcc1c57bcd24ea18628444340faff222ef64


commit 0ca5dcc1c57bcd24ea18628444340faff222ef64
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Tue Mar 22 09:17:36 2022 -0700

    grep: work around PCRE2 bug 2642
    
    Problem reported by Carlo Arenas in:
    https://lists.gnu.org/r/grep-devel/2022-03/msg00004.html
    * src/pcresearch.c (Pcompile) [PCRE2_MATCH_INVALID_UTF]:
    In PCRE2 10.35 and earlier, disable start optimization if doing a
    caseless UTF-8 search.

diff --git a/src/pcresearch.c b/src/pcresearch.c
index f332a44..0cf804d 100644
--- a/src/pcresearch.c
+++ b/src/pcresearch.c
@@ -154,6 +154,12 @@ Pcompile (char *pattern, idx_t size, reg_syntax_t ignored, 
bool exact)
 #ifdef PCRE2_MATCH_INVALID_UTF
       /* Consider invalid UTF-8 as a barrier, instead of error.  */
       flags |= PCRE2_MATCH_INVALID_UTF;
+
+# if ! (10 < PCRE2_MAJOR + (36 <= PCRE2_MINOR))
+      /* Work around PCRE2 bug 2642.  */
+      if (flags & PCRE2_CASELESS)
+        flags |= PCRE2_NO_START_OPTIMIZE;
+# endif
 #endif
     }
 

-----------------------------------------------------------------------

Summary of changes:
 src/pcresearch.c | 6 ++++++
 1 file changed, 6 insertions(+)


hooks/post-receive
-- 
grep



reply via email to

[Prev in Thread] Current Thread [Next in Thread]