grep-commit
[Top][All Lists]
Advanced

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

grep branch, master, updated. v2.8-6-gc079748


From: Jim Meyering
Subject: grep branch, master, updated. v2.8-6-gc079748
Date: Sat, 21 May 2011 11:41:39 +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  c079748fd59d5562633dcc11d971347c58413feb (commit)
       via  2c1a222ec4a90219486f01efcd7d1cfd2ce6d30f (commit)
       via  cda56673b41c68b525c46d0d1737cc53a125b274 (commit)
       via  2be2b8c044f8bd0fc6723004840029bd85078196 (commit)
       via  8e6d2371460706b0ad48ee476fb5cde7f4cd61ee (commit)
      from  23456ed5c8df2ec6263ffc435ac96790b35e3f9e (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=c079748fd59d5562633dcc11d971347c58413feb


commit c079748fd59d5562633dcc11d971347c58413feb
Author: Jim Meyering <address@hidden>
Date:   Sat May 21 12:58:55 2011 +0200

    grep -P: don't abort upon exceeding PCRE's backtracking limit
    
    * src/pcresearch.c (Pexecute): Handle PCRE_ERROR_MATCHLIMIT.
    * tests/Makefile.am (XFAIL_TESTS): Remove pcre-abort.
    * tests/pcre-abort: Expect failure, no output, and increase
    the length of the input string, in case the backtracking limit
    is ever raised.  Adjust comment.
    * NEWS (Bug fixes): Mention it.

diff --git a/NEWS b/NEWS
index 4dcee07..312c803 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,12 @@ GNU grep NEWS                                    -*- outline 
-*-
 
 * Noteworthy changes in release ?.? (????-??-??) [?]
 
+** Bug fixes
+
+  grep -P no longer aborts when PCRE's backtracking limit is exceeded
+  Before, echo aaaaaaaaaaaaaab |grep -P '((a+)*)+$' would abort.  Now,
+  it diagnoses the problem and exits with status 2.
+
 
 * Noteworthy changes in release 2.8 (2011-05-13) [stable]
 
diff --git a/src/pcresearch.c b/src/pcresearch.c
index afb8a29..52db987 100644
--- a/src/pcresearch.c
+++ b/src/pcresearch.c
@@ -148,6 +148,10 @@ Pexecute (char const *buf, size_t size, size_t *match_size,
         case PCRE_ERROR_NOMEMORY:
           error (EXIT_TROUBLE, 0, _("memory exhausted"));
 
+        case PCRE_ERROR_MATCHLIMIT:
+          error (EXIT_TROUBLE, 0,
+                 _("exceeded PCRE's backtracking limit"));
+
         default:
           abort ();
         }
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 6109832..a01b004 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -33,7 +33,6 @@ if USE_INCLUDED_REGEX
 XFAIL_TESTS += equiv-classes
 endif
 XFAIL_TESTS += turkish-I
-XFAIL_TESTS += pcre-abort
 
 TESTS =                                                \
   backref                                      \
diff --git a/tests/pcre-abort b/tests/pcre-abort
index fd67932..131fa47 100755
--- a/tests/pcre-abort
+++ b/tests/pcre-abort
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Show how to make grep -P abort.
+# Show that grep handles PCRE's PCRE_ERROR_MATCHLIMIT.
+# In grep-2.8, it would abort.
 #
 # Copyright (C) 2011 Free Software Foundation, Inc.
 #
@@ -12,8 +13,9 @@ require_pcre_
 
 fail=0
 
-echo aaaaaaaaaaaaaab > in || framework_failure_
-grep -P '((a+)*)+$' in > out || fail=1
-compare in out || fail=1
+echo aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab > in || framework_failure_
+grep -P '((a+)*)+$' in > out
+test $? = 2 || fail=1
+compare out /dev/null || fail=1
 
 Exit $fail

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=2c1a222ec4a90219486f01efcd7d1cfd2ce6d30f


commit c079748fd59d5562633dcc11d971347c58413feb
Author: Jim Meyering <address@hidden>
Date:   Sat May 21 12:58:55 2011 +0200

    grep -P: don't abort upon exceeding PCRE's backtracking limit
    
    * src/pcresearch.c (Pexecute): Handle PCRE_ERROR_MATCHLIMIT.
    * tests/Makefile.am (XFAIL_TESTS): Remove pcre-abort.
    * tests/pcre-abort: Expect failure, no output, and increase
    the length of the input string, in case the backtracking limit
    is ever raised.  Adjust comment.
    * NEWS (Bug fixes): Mention it.

diff --git a/NEWS b/NEWS
index 4dcee07..312c803 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,12 @@ GNU grep NEWS                                    -*- outline 
-*-
 
 * Noteworthy changes in release ?.? (????-??-??) [?]
 
+** Bug fixes
+
+  grep -P no longer aborts when PCRE's backtracking limit is exceeded
+  Before, echo aaaaaaaaaaaaaab |grep -P '((a+)*)+$' would abort.  Now,
+  it diagnoses the problem and exits with status 2.
+
 
 * Noteworthy changes in release 2.8 (2011-05-13) [stable]
 
diff --git a/src/pcresearch.c b/src/pcresearch.c
index afb8a29..52db987 100644
--- a/src/pcresearch.c
+++ b/src/pcresearch.c
@@ -148,6 +148,10 @@ Pexecute (char const *buf, size_t size, size_t *match_size,
         case PCRE_ERROR_NOMEMORY:
           error (EXIT_TROUBLE, 0, _("memory exhausted"));
 
+        case PCRE_ERROR_MATCHLIMIT:
+          error (EXIT_TROUBLE, 0,
+                 _("exceeded PCRE's backtracking limit"));
+
         default:
           abort ();
         }
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 6109832..a01b004 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -33,7 +33,6 @@ if USE_INCLUDED_REGEX
 XFAIL_TESTS += equiv-classes
 endif
 XFAIL_TESTS += turkish-I
-XFAIL_TESTS += pcre-abort
 
 TESTS =                                                \
   backref                                      \
diff --git a/tests/pcre-abort b/tests/pcre-abort
index fd67932..131fa47 100755
--- a/tests/pcre-abort
+++ b/tests/pcre-abort
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Show how to make grep -P abort.
+# Show that grep handles PCRE's PCRE_ERROR_MATCHLIMIT.
+# In grep-2.8, it would abort.
 #
 # Copyright (C) 2011 Free Software Foundation, Inc.
 #
@@ -12,8 +13,9 @@ require_pcre_
 
 fail=0
 
-echo aaaaaaaaaaaaaab > in || framework_failure_
-grep -P '((a+)*)+$' in > out || fail=1
-compare in out || fail=1
+echo aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab > in || framework_failure_
+grep -P '((a+)*)+$' in > out
+test $? = 2 || fail=1
+compare out /dev/null || fail=1
 
 Exit $fail

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=cda56673b41c68b525c46d0d1737cc53a125b274


commit c079748fd59d5562633dcc11d971347c58413feb
Author: Jim Meyering <address@hidden>
Date:   Sat May 21 12:58:55 2011 +0200

    grep -P: don't abort upon exceeding PCRE's backtracking limit
    
    * src/pcresearch.c (Pexecute): Handle PCRE_ERROR_MATCHLIMIT.
    * tests/Makefile.am (XFAIL_TESTS): Remove pcre-abort.
    * tests/pcre-abort: Expect failure, no output, and increase
    the length of the input string, in case the backtracking limit
    is ever raised.  Adjust comment.
    * NEWS (Bug fixes): Mention it.

diff --git a/NEWS b/NEWS
index 4dcee07..312c803 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,12 @@ GNU grep NEWS                                    -*- outline 
-*-
 
 * Noteworthy changes in release ?.? (????-??-??) [?]
 
+** Bug fixes
+
+  grep -P no longer aborts when PCRE's backtracking limit is exceeded
+  Before, echo aaaaaaaaaaaaaab |grep -P '((a+)*)+$' would abort.  Now,
+  it diagnoses the problem and exits with status 2.
+
 
 * Noteworthy changes in release 2.8 (2011-05-13) [stable]
 
diff --git a/src/pcresearch.c b/src/pcresearch.c
index afb8a29..52db987 100644
--- a/src/pcresearch.c
+++ b/src/pcresearch.c
@@ -148,6 +148,10 @@ Pexecute (char const *buf, size_t size, size_t *match_size,
         case PCRE_ERROR_NOMEMORY:
           error (EXIT_TROUBLE, 0, _("memory exhausted"));
 
+        case PCRE_ERROR_MATCHLIMIT:
+          error (EXIT_TROUBLE, 0,
+                 _("exceeded PCRE's backtracking limit"));
+
         default:
           abort ();
         }
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 6109832..a01b004 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -33,7 +33,6 @@ if USE_INCLUDED_REGEX
 XFAIL_TESTS += equiv-classes
 endif
 XFAIL_TESTS += turkish-I
-XFAIL_TESTS += pcre-abort
 
 TESTS =                                                \
   backref                                      \
diff --git a/tests/pcre-abort b/tests/pcre-abort
index fd67932..131fa47 100755
--- a/tests/pcre-abort
+++ b/tests/pcre-abort
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Show how to make grep -P abort.
+# Show that grep handles PCRE's PCRE_ERROR_MATCHLIMIT.
+# In grep-2.8, it would abort.
 #
 # Copyright (C) 2011 Free Software Foundation, Inc.
 #
@@ -12,8 +13,9 @@ require_pcre_
 
 fail=0
 
-echo aaaaaaaaaaaaaab > in || framework_failure_
-grep -P '((a+)*)+$' in > out || fail=1
-compare in out || fail=1
+echo aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab > in || framework_failure_
+grep -P '((a+)*)+$' in > out
+test $? = 2 || fail=1
+compare out /dev/null || fail=1
 
 Exit $fail

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=2be2b8c044f8bd0fc6723004840029bd85078196


commit c079748fd59d5562633dcc11d971347c58413feb
Author: Jim Meyering <address@hidden>
Date:   Sat May 21 12:58:55 2011 +0200

    grep -P: don't abort upon exceeding PCRE's backtracking limit
    
    * src/pcresearch.c (Pexecute): Handle PCRE_ERROR_MATCHLIMIT.
    * tests/Makefile.am (XFAIL_TESTS): Remove pcre-abort.
    * tests/pcre-abort: Expect failure, no output, and increase
    the length of the input string, in case the backtracking limit
    is ever raised.  Adjust comment.
    * NEWS (Bug fixes): Mention it.

diff --git a/NEWS b/NEWS
index 4dcee07..312c803 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,12 @@ GNU grep NEWS                                    -*- outline 
-*-
 
 * Noteworthy changes in release ?.? (????-??-??) [?]
 
+** Bug fixes
+
+  grep -P no longer aborts when PCRE's backtracking limit is exceeded
+  Before, echo aaaaaaaaaaaaaab |grep -P '((a+)*)+$' would abort.  Now,
+  it diagnoses the problem and exits with status 2.
+
 
 * Noteworthy changes in release 2.8 (2011-05-13) [stable]
 
diff --git a/src/pcresearch.c b/src/pcresearch.c
index afb8a29..52db987 100644
--- a/src/pcresearch.c
+++ b/src/pcresearch.c
@@ -148,6 +148,10 @@ Pexecute (char const *buf, size_t size, size_t *match_size,
         case PCRE_ERROR_NOMEMORY:
           error (EXIT_TROUBLE, 0, _("memory exhausted"));
 
+        case PCRE_ERROR_MATCHLIMIT:
+          error (EXIT_TROUBLE, 0,
+                 _("exceeded PCRE's backtracking limit"));
+
         default:
           abort ();
         }
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 6109832..a01b004 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -33,7 +33,6 @@ if USE_INCLUDED_REGEX
 XFAIL_TESTS += equiv-classes
 endif
 XFAIL_TESTS += turkish-I
-XFAIL_TESTS += pcre-abort
 
 TESTS =                                                \
   backref                                      \
diff --git a/tests/pcre-abort b/tests/pcre-abort
index fd67932..131fa47 100755
--- a/tests/pcre-abort
+++ b/tests/pcre-abort
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Show how to make grep -P abort.
+# Show that grep handles PCRE's PCRE_ERROR_MATCHLIMIT.
+# In grep-2.8, it would abort.
 #
 # Copyright (C) 2011 Free Software Foundation, Inc.
 #
@@ -12,8 +13,9 @@ require_pcre_
 
 fail=0
 
-echo aaaaaaaaaaaaaab > in || framework_failure_
-grep -P '((a+)*)+$' in > out || fail=1
-compare in out || fail=1
+echo aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab > in || framework_failure_
+grep -P '((a+)*)+$' in > out
+test $? = 2 || fail=1
+compare out /dev/null || fail=1
 
 Exit $fail

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=8e6d2371460706b0ad48ee476fb5cde7f4cd61ee


commit c079748fd59d5562633dcc11d971347c58413feb
Author: Jim Meyering <address@hidden>
Date:   Sat May 21 12:58:55 2011 +0200

    grep -P: don't abort upon exceeding PCRE's backtracking limit
    
    * src/pcresearch.c (Pexecute): Handle PCRE_ERROR_MATCHLIMIT.
    * tests/Makefile.am (XFAIL_TESTS): Remove pcre-abort.
    * tests/pcre-abort: Expect failure, no output, and increase
    the length of the input string, in case the backtracking limit
    is ever raised.  Adjust comment.
    * NEWS (Bug fixes): Mention it.

diff --git a/NEWS b/NEWS
index 4dcee07..312c803 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,12 @@ GNU grep NEWS                                    -*- outline 
-*-
 
 * Noteworthy changes in release ?.? (????-??-??) [?]
 
+** Bug fixes
+
+  grep -P no longer aborts when PCRE's backtracking limit is exceeded
+  Before, echo aaaaaaaaaaaaaab |grep -P '((a+)*)+$' would abort.  Now,
+  it diagnoses the problem and exits with status 2.
+
 
 * Noteworthy changes in release 2.8 (2011-05-13) [stable]
 
diff --git a/src/pcresearch.c b/src/pcresearch.c
index afb8a29..52db987 100644
--- a/src/pcresearch.c
+++ b/src/pcresearch.c
@@ -148,6 +148,10 @@ Pexecute (char const *buf, size_t size, size_t *match_size,
         case PCRE_ERROR_NOMEMORY:
           error (EXIT_TROUBLE, 0, _("memory exhausted"));
 
+        case PCRE_ERROR_MATCHLIMIT:
+          error (EXIT_TROUBLE, 0,
+                 _("exceeded PCRE's backtracking limit"));
+
         default:
           abort ();
         }
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 6109832..a01b004 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -33,7 +33,6 @@ if USE_INCLUDED_REGEX
 XFAIL_TESTS += equiv-classes
 endif
 XFAIL_TESTS += turkish-I
-XFAIL_TESTS += pcre-abort
 
 TESTS =                                                \
   backref                                      \
diff --git a/tests/pcre-abort b/tests/pcre-abort
index fd67932..131fa47 100755
--- a/tests/pcre-abort
+++ b/tests/pcre-abort
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Show how to make grep -P abort.
+# Show that grep handles PCRE's PCRE_ERROR_MATCHLIMIT.
+# In grep-2.8, it would abort.
 #
 # Copyright (C) 2011 Free Software Foundation, Inc.
 #
@@ -12,8 +13,9 @@ require_pcre_
 
 fail=0
 
-echo aaaaaaaaaaaaaab > in || framework_failure_
-grep -P '((a+)*)+$' in > out || fail=1
-compare in out || fail=1
+echo aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab > in || framework_failure_
+grep -P '((a+)*)+$' in > out
+test $? = 2 || fail=1
+compare out /dev/null || fail=1
 
 Exit $fail

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

Summary of changes:
 NEWS              |    6 ++++++
 src/pcresearch.c  |    4 ++++
 tests/Makefile.am |    1 +
 tests/init.cfg    |    6 ++++++
 tests/pcre        |   11 +++--------
 tests/pcre-abort  |   21 +++++++++++++++++++++
 tests/pcre-z      |    7 +++----
 7 files changed, 44 insertions(+), 12 deletions(-)
 create mode 100755 tests/pcre-abort


hooks/post-receive
-- 
grep



reply via email to

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