gawk-diffs
[Top][All Lists]
Advanced

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

[gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-100


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-1008-g11d4ea5
Date: Sat, 15 Jul 2017 15:28:05 -0400 (EDT)

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 "gawk".

The branch, gawk-4.1-stable has been updated
       via  11d4ea518166ffbc0c2fe85d090723e8f299486c (commit)
      from  4cd70811e7e335fe568f62c564ac2bef0515694f (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.sv.gnu.org/cgit/gawk.git/commit/?id=11d4ea518166ffbc0c2fe85d090723e8f299486c

commit 11d4ea518166ffbc0c2fe85d090723e8f299486c
Author: Arnold D. Robbins <address@hidden>
Date:   Sat Jul 15 22:27:24 2017 +0300

    Revert 92ec6835548d36 - don't use DFA if need_start is true.

diff --git a/ChangeLog b/ChangeLog
index 4c34f19..8c8d91d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2017-07-15         Arnold D. Robbins     <address@hidden>
+
+       Revert change of 2016-07-24 that always runs the dfa
+       matcher. Based on a bug report from Alexandre Oliva
+       <address@hidden>, DFA can cause gawk to hang, even
+       in the C locale.
+
+       * re.c (research): Don't use dfa if need_start is true.
+
 2017-07-07         Arnold D. Robbins     <address@hidden>
 
        Remove warnings from GCC 7.1 compilation.
diff --git a/re.c b/re.c
index 878c884..d1b0ee7 100644
--- a/re.c
+++ b/re.c
@@ -268,17 +268,26 @@ research(Regexp *rp, char *str, int start,
                rp->pat.not_bol = 1;
 
        /*
-        * Always do dfa search if can; if it fails, we won't bother
-        * with the regex search.
+        * Always do dfa search if can; if it fails, then even if
+        * need_start is true, we won't bother with the regex search.
         *
         * The dfa matcher doesn't have a no_bol flag, so don't bother
         * trying it in that case.
         *
+        * 7/2008: Skip the dfa matcher if need_start. The dfa matcher
+        * has bugs in certain multibyte cases and it's too difficult
+        * to try to special case things.
+        * 7/2017: Apparently there are some cases where DFA gets
+        * stuck, even in the C locale, so we use dfa only if not need_start.
+        *
+        * Should that issue ever get resolved, note this comment:
+        *
         * 7/2016: The dfa matcher can't handle a case where searching
         * starts in the middle of a string, so don't bother trying it
         * in that case.
+        *      if (rp->dfa && ! no_bol && start == 0) ...
         */
-       if (rp->dfa && ! no_bol && start == 0) {
+       if (rp->dfa && ! no_bol && ! need_start) {
                char save;
                size_t count = 0;
                struct dfa *superset = dfasuperset(rp->dfareg);

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

Summary of changes:
 ChangeLog |  9 +++++++++
 re.c      | 15 ++++++++++++---
 2 files changed, 21 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

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