grep: fix segfault under -P + PCRE2 <=10.30 + (*NO_JIT)
[gitweb.git] / t / t7810-grep.sh
index 2a6679c2f596fb13a34786a4aa4b954e61c61113..c8ff50cc306126e06f58ead078ba0327fe16a48a 100755 (executable)
@@ -1110,6 +1110,12 @@ test_expect_success PCRE 'grep -P pattern' '
        test_cmp expected actual
 '
 
+test_expect_success LIBPCRE2 "grep -P with (*NO_JIT) doesn't error out" '
+       git grep -P "(*NO_JIT)\p{Ps}.*?\p{Pe}" hello.c >actual &&
+       test_cmp expected actual
+
+'
+
 test_expect_success !PCRE 'grep -P pattern errors without PCRE' '
        test_must_fail git grep -P "foo.*bar"
 '