Andreas Schwab
461bbb0f4a
- test-pcre-jitstack.diff: avoid false positive upon stack overflow OBS-URL: https://build.opensuse.org/request/show/676970 OBS-URL: https://build.opensuse.org/package/show/Base:System/grep?expand=0&rev=93
33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
From 64d7da63575bc6cb0bbcf7ac5ed81d51ea2a3a74 Mon Sep 17 00:00:00 2001
|
|
From: Jim Meyering <meyering@fb.com>
|
|
Date: Sun, 17 Feb 2019 17:47:30 -0800
|
|
Subject: [PATCH] tests: avoid false positive upon stack overflow
|
|
|
|
* tests/pcre-jitstack: Don't let a stack overflow evoke a false
|
|
failure. This test is to ensure there is no internal PCRE error.
|
|
Reported by Andres Schwab in http://bugs.gnu.org/34370
|
|
---
|
|
tests/pcre-jitstack | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/tests/pcre-jitstack b/tests/pcre-jitstack
|
|
index a6c9c21..8f738f0 100755
|
|
--- a/tests/pcre-jitstack
|
|
+++ b/tests/pcre-jitstack
|
|
@@ -52,8 +52,11 @@ if test $? != 1; then
|
|
|
|
# Rerun that same test, but now with no limit on stack size:
|
|
(ulimit -s unlimited;
|
|
- returns_ 1 env LC_ALL=C grep -P -n '^([/](?!/)|[^/])*~/.*' pcrejit.txt) \
|
|
+ returns_ 1 env LC_ALL=C grep -P -n '^([/](?!/)|[^/])*~/.*' pcrejit.txt 2> err) \
|
|
|| fail=1
|
|
+
|
|
+ # If that failed due to stack overflow, don't cry foul.
|
|
+ test $fail = 1 && grep -q 'stack overflow' err && fail=0
|
|
fi
|
|
|
|
Exit $fail
|
|
--
|
|
2.20.1.2.gb21ebb671b
|
|
|