In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/045325615467f1c1f009faca5f22887c8c0724b5?hp=d90bd2cf701d08f6acfea11ab39eb0a20f9a6c3e>

- Log -----------------------------------------------------------------
commit 045325615467f1c1f009faca5f22887c8c0724b5
Author: Karl Williamson <[email protected]>
Date:   Wed Apr 3 10:25:26 2019 -0600

    PATCH: [perl #133978] BBC breaks Jcode
    
    This turned out to be caused by taking another macro as a template
    without understanding the subtleties.  In this case, the variable
    'previous_occurrence_end' should be updated only if 'COND' is true.  (In
    the template the COND was implicitly true)

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

Summary of changes:
 regexec.c     | 11 ++++++++---
 t/re/re_tests |  1 +
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/regexec.c b/regexec.c
index 73090007f6..ee98c86414 100644
--- a/regexec.c
+++ b/regexec.c
@@ -1856,9 +1856,14 @@ STMT_START {
             break;                                          \
         }                                                   \
                                                             \
-        if (COND) FBC_CHECK_AND_TRY                         \
-        s += UTF8SKIP(s);                                   \
-        previous_occurrence_end = s;                        \
+        if (COND) {                                         \
+            FBC_CHECK_AND_TRY                               \
+            s += UTF8SKIP(s);                               \
+            previous_occurrence_end = s;                    \
+        }                                                   \
+        else {                                              \
+            s += UTF8SKIP(s);                               \
+        }                                                   \
     }
 
 /* The three macros below are slightly different versions of the same logic.
diff --git a/t/re/re_tests b/t/re/re_tests
index 991cde6066..17a5b53eee 100644
--- a/t/re/re_tests
+++ b/t/re/re_tests
@@ -2015,6 +2015,7 @@ AB\s+\x{100}      AB \x{100}X     y       -       -
 /\1a(b)/       bab     n       -       -               # This compiles but 
fails to match as \1 is not set when parsed.
 /(?iu)(?<=\xdf)hbase/  sshbase y       $&      hbase
 
/\x{30c3}?[\x{30a2}\x{30a4}\x{30a6}\x{30a8}\x{30aa}-\x{30e2}\x{30e4}\x{30e6}\x{30e8}-\x{30f4}](?:[\x{30e3}\x{30e5}\x{30e7}\x{30a1}\x{30a3}\x{30a5}\x{30a7}\x{30a9}])?\x{30fc}?\x{30f3}?/
       \x{30de}\x{30fc}\x{30af}\x{30b5}\x{30fc}\x{30d3}\x{30b9}        y       
$&      \x{30de}\x{30fc}        # part of [perl #133942
+/[\x{3041}-\x{3093}]+/ 
\x{6f22}\x{5b57}\x{3001}\x{30ab}\x{30bf}\x{30ab}\x{30ca}\x{3001}\x{3072}\x{3089}\x{304c}\x{306a}\x{306e}\x{5165}\x{3063}\x{305f}String
  y       $&      \x{3072}\x{3089}\x{304c}\x{306a}\x{306e}        # [perl 
#133978]
 
 # Keep these lines at the end of the file
 # vim: softtabstop=0 noexpandtab

-- 
Perl5 Master Repository

Reply via email to