grep-commit
[Top][All Lists]
Advanced

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

grep branch, master, updated. v2.18-65-g4965c79


From: Jim Meyering
Subject: grep branch, master, updated. v2.18-65-g4965c79
Date: Mon, 14 Apr 2014 15:35:46 +0000

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  4965c7942ee355587d47624b226725184fea73c3 (commit)
      from  c96d5e6f6fb4bf5e1c46769fd87d6667b5c322ea (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=4965c7942ee355587d47624b226725184fea73c3


commit 4965c7942ee355587d47624b226725184fea73c3
Author: Jim Meyering <address@hidden>
Date:   Sun Apr 13 13:21:14 2014 -0700

    tests: detect an infloop-inducing bug in grep -P (pcre-8.35)
    
    * tests/pcre-infloop: New test.
    * tests/Makefile.am (TESTS): Add it.

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 49d6cba..cc79903 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -83,6 +83,7 @@ TESTS =                                               \
   options                                      \
   pcre                                         \
   pcre-abort                                   \
+  pcre-infloop                                 \
   pcre-invalid-utf8-input                      \
   pcre-utf8                                    \
   pcre-w                                       \
diff --git a/tests/pcre-infloop b/tests/pcre-infloop
new file mode 100755
index 0000000..57b67ae
--- /dev/null
+++ b/tests/pcre-infloop
@@ -0,0 +1,33 @@
+#!/bin/sh
+# With some versions of libpcre, apparently including 8.35,
+# the following would trigger an infinite loop in its match function.
+
+# Copyright 2014 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+require_pcre_
+require_timeout_
+require_en_utf8_locale_
+require_compiled_in_MB_support
+
+printf 'a\201b\r' > in || framework_failure_
+
+fail=0
+
+LC_ALL=en_US.utf8 timeout 3 grep -P 'a.?..b' in
+test $? = 1 || fail_ "libpcre's match function appears to infloop"
+
+Exit $fail

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

Summary of changes:
 tests/Makefile.am                    |    1 +
 tests/{dfa-coverage => pcre-infloop} |   17 +++++++++--------
 2 files changed, 10 insertions(+), 8 deletions(-)
 copy tests/{dfa-coverage => pcre-infloop} (67%)


hooks/post-receive
-- 
grep



reply via email to

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