bug#47264: [PATCH] pcre: migrate to pcre2

2021-11-07 Thread Carlo Marcelo Arenas Belón
Marcelo Arenas Belón --- configure.ac | 2 +- doc/grep.in.1| 8 +- doc/grep.texi| 2 +- m4/{pcre.m4 => pcre2.m4} | 23 ++-- src/pcresearch.c | 235 ++- tests/filename-lineno.pl | 4 +- 6 files changed,

bug#51458: grep PCRE - '^' and '$' are not recognized as begin and end of line for multiline strings

2021-11-08 Thread Carlo Marcelo Arenas Belón
older versions of PCRE support in grep used multiline mode by default, which seems to be required by your expression to work and is also on by default in the regex site. you can add it back using an internal option[1] from PCRE, as shown in the following modified expression from your original exam

bug#51710: [PATCH] pcre: avoid overflow in PCRE JIT stack resizing

2021-11-09 Thread Carlo Marcelo Arenas Belón
like value by sljit. Alternatively, a smaller maximum could be selected as it has been documented[1] that more than 1MB would be unrealistic. [1] https://www.pcre.org/original/doc/html/pcrejit.html#SEC8 Signed-off-by: Carlo Marcelo Arenas Belón --- src/pcresearch.c | 4 1 file changed, 4

bug#47264: [PATCH v2] pcre: migrate to pcre2

2021-11-09 Thread Carlo Marcelo Arenas Belón
quivalent, and it also seems functionally complete. Signed-off-by: Carlo Marcelo Arenas Belón --- configure.ac | 2 +- doc/grep.in.1| 8 +- doc/grep.texi| 2 +- m4/{pcre.m4 => pcre2.m4} | 23 ++-- src/pcresearc

bug#51727: add an optional flag to -P to disable JIT

2021-11-09 Thread Carlo Marcelo Arenas Belón
bit Mainly useful for performance testing. Signed-off-by: Carlo Marcelo Arenas Belón --- doc/grep.texi | 4 +++- src/grep.c| 13 +++-- src/grep.h| 1 + src/pcresearch.c | 6 -- tests/Makefile.am | 1 + tests/pcre-nojit | 22 ++ 6 files chan

bug#51735: [PATCH] tests: fix test logic for pcre-context

2021-11-09 Thread Carlo Marcelo Arenas Belón
expected LF characters, but a full fix will have to wait until PCRE2. Signed-off-by: Carlo Marcelo Arenas Belón --- tests/pcre-context | 40 ++-- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/tests/pcre-context b/tests/pcre-context index

bug#47264: [PATCH v2] pcre: migrate to pcre2

2021-11-15 Thread Carlo Marcelo Arenas Belón
ce, as all versions of PCRE2 that define PCRE2_SIZE_MAX do it as SIZE_MAX, but lets avoid any surprises by using the same value we are using everywhere else in case it ever changes. Signed-off-by: Carlo Marcelo Arenas Belón --- src/pcresearch.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

bug#47264: [PATCH v2] pcre: migrate to pcre2

2021-11-15 Thread Carlo Marcelo Arenas Belón
On Mon, Nov 15, 2021 at 03:24:41PM -0800, Paul Eggert wrote: > On 11/15/21 12:49, Carlo Marcelo Arenas Belón wrote: > > > Apologies, I realize it is difficult to talk about code in abstract when > > not inlined, but I think it will better addressed by "fixing" it

bug#62983: workaround PCRE2 bug affecting at least \D and \W

2023-04-20 Thread Carlo Marcelo Arenas Belón
All versions of PCRE2 that include PCRE2_MATCH_INVALID_UTF had a bug on its JIT implementation that results in failure to match for the negative perl classes, and seems to be easier to replicate when the matching character is a multibyte one. Disable that flag and use the original fallback instead

bug#62983: workaround PCRE2 bug affecting at least \D and \W

2023-04-21 Thread Carlo Marcelo Arenas Belón
On Fri, Apr 21, 2023 at 11:42:50AM -0700, Paul Eggert wrote: > On 2023-04-20 19:04, Carlo Marcelo Arenas Belón wrote: > > All versions of PCRE2 that include PCRE2_MATCH_INVALID_UTF had a bug on > > its JIT implementation that results in failure to match for the negative > > pe

bug#63016: make it easier to build with development versions of PCRE2

2023-04-22 Thread Carlo Marcelo Arenas Belón
Building against a different version of PCRE2 that the one that is provided with the system is complicated by the fact that unlike what is advertised, if a pkg-config module for libpcre2-8 is found, it will override the values that were provided with PCRE_CFLAGS and PCRE_LIBS. Carlo >From b0a2cffc

bug#63484: FAIL: y2038-vs-32-bit

2023-05-13 Thread Carlo Marcelo Arenas Belón
Would the attached workaround the issue? Carlo >From 1fb2147cead1d201b64f4b17154181cd6278eb7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlo=20Marcelo=20Arenas=20Bel=C3=B3n?= Date: Sat, 13 May 2023 07:28:35 -0700 Subject: [PATCH] tests: skip y2038 test upon compare failure * tests/y2038-vs-32-bi

bug#63484: FAIL: y2038-vs-32-bit

2023-05-13 Thread Carlo Marcelo Arenas Belón
Could you apply the attached patch? Carlo >From b19df9fa4402349e8ae3c35f0e3738f66d354d59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlo=20Marcelo=20Arenas=20Bel=C3=B3n?= Date: Sat, 13 May 2023 07:28:35 -0700 Subject: [PATCH v2] tests: protect y2038 against diff failures * tests/y2038-vs-32-bit:

bug#63484: FAIL: y2038-vs-32-bit

2023-05-13 Thread Carlo Marcelo Arenas Belón
On Sat, May 13, 2023 at 05:41:03PM +0200, Andreas Schwab wrote: > > https://build.opensuse.org/package/show/home:Andreas_Schwab:Factory/grep confirmed the diffutils (version 3.9) in that version of openSUSE, is affected (both diff and cmp) by the Y2K38 bug[1], but grep is not. attached v3 would

bug#63533: test-mbrlen5.sh failure

2023-05-17 Thread Carlo Marcelo Arenas Belón
On Wed, May 17, 2023 at 09:09:02PM -0400, Caleb Zulawski wrote: > > Isn’t this test too strict, then? It shouldn't had been included with the release; the attached patch should help with that for future releases. > Or is there some way to disable/allow failure for this particular test? In your

bug#63533: test-mbrlen5.sh failure

2023-05-19 Thread Carlo Marcelo Arenas Belón
On Thu, May 18, 2023 at 10:09:38PM +0200, Jim Meyering wrote: > On Thu, May 18, 2023 at 2:44 PM Carlo Marcelo Arenas Belón > wrote: > > On Wed, May 17, 2023 at 09:09:02PM -0400, Caleb Zulawski wrote: > > > > > > Isn’t this test too strict, then? > > > &g