Accepting request 676971 from Base:System
- test-pcre-jitstack.diff: avoid false positive upon stack overflow (forwarded request 676970 from Andreas_Schwab) OBS-URL: https://build.opensuse.org/request/show/676971 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grep?expand=0&rev=70
This commit is contained in:
commit
f0a3f7b2fc
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Feb 18 08:57:22 UTC 2019 - schwab@suse.de
|
||||||
|
|
||||||
|
- test-pcre-jitstack.diff: avoid false positive upon stack overflow
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jan 7 11:53:21 UTC 2019 - schwab@suse.de
|
Mon Jan 7 11:53:21 UTC 2019 - schwab@suse.de
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ Url: https://www.gnu.org/software/grep/
|
|||||||
Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
|
Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
|
||||||
Source2: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig
|
Source2: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig
|
||||||
Source3: https://savannah.gnu.org/project/memberlist-gpgkeys.php?group=grep&download=1#/%{name}.keyring
|
Source3: https://savannah.gnu.org/project/memberlist-gpgkeys.php?group=grep&download=1#/%{name}.keyring
|
||||||
|
Patch0: test-pcre-jitstack.diff
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: makeinfo
|
BuildRequires: makeinfo
|
||||||
BuildRequires: pcre-devel
|
BuildRequires: pcre-devel
|
||||||
@ -42,6 +43,7 @@ match to a specified pattern. By default, grep prints the matching lines.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure \
|
%configure \
|
||||||
|
32
test-pcre-jitstack.diff
Normal file
32
test-pcre-jitstack.diff
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user