In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/5e20fb07d2b8373f53f053086ba668649763de9a?hp=e099ea69849a3f8a0139b1ff7e4a06c029d8d91e>

- Log -----------------------------------------------------------------
commit 5e20fb07d2b8373f53f053086ba668649763de9a
Author: Karl Williamson <[email protected]>
Date:   Sun Apr 1 13:58:47 2018 -0600

    PATCH [perl #132164] regcomp.c: Don't try to increment infinity
    
    This value can be infinity (which is here SSize_t_MAX).  Leave it there.

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

Summary of changes:
 regcomp.c  | 4 +++-
 t/re/pat.t | 5 ++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/regcomp.c b/regcomp.c
index d37f2d1777..11899eec0a 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -5476,7 +5476,9 @@ Perl_re_printf( aTHX_  "LHS=%" UVuf " RHS=%" UVuf "\n",
                 /* Cannot expect anything... */
                 scan_commit(pRExC_state, data, minlenp, is_inf);
                data->pos_min += 1;
-               data->pos_delta += 1;
+                if (data->pos_delta != SSize_t_MAX) {
+                    data->pos_delta += 1;
+                }
                data->cur_is_floating = 1; /* float */
            }
        }
diff --git a/t/re/pat.t b/t/re/pat.t
index 066ac96257..82206df0a3 100644
--- a/t/re/pat.t
+++ b/t/re/pat.t
@@ -23,7 +23,7 @@ BEGIN {
     skip_all('no re module') unless defined &DynaLoader::boot_DynaLoader;
     skip_all_without_unicode_tables();
 
-plan tests => 847;  # Update this when adding/deleting tests.
+plan tests => 848;  # Update this when adding/deleting tests.
 
 run_tests() unless caller;
 
@@ -1943,6 +1943,9 @@ EOP
     {   # [perl $132227]
         fresh_perl_is("('0ba' . ('ss' x 300)) =~ m/0B\\N{U+41}" . $sharp_s x 
150 . '/i and print "1\n"',  1,{},"Use of sharp s under /di that changes to 
/ui");
     }
+    {   # [perl $132164]
+        fresh_perl_is('m m0*0+\Rm', "",{},"Undefined behavior in address 
sanitizer");
+    }
 
 } # End of sub run_tests
 

-- 
Perl5 Master Repository

Reply via email to