SetProgLen(RExC_rxi,RExC_size);
- /* The values for the two variables below are now immutable, we can add
- * them to the list to free without overwhelming it */
- if (RExC_open_parens) {
- SAVEFREEPV(RExC_open_parens);
- }
- if (RExC_close_parens) {
- SAVEFREEPV(RExC_close_parens);
- }
-
/* Update the string to compile, with correct modifiers, etc */
set_regex_pv(pRExC_state, Rx);
});
#endif
+ if (RExC_open_parens) {
+ Safefree(RExC_open_parens);
+ RExC_open_parens = NULL;
+ }
+ if (RExC_close_parens) {
+ Safefree(RExC_close_parens);
+ RExC_close_parens = NULL;
+ }
+
#ifdef USE_ITHREADS
/* under ithreads the ?pat? PMf_USED flag on the pmop is simulated
* by setting the regexp SV to readonly-only instead. If the
skip_all('no re module') unless defined &DynaLoader::boot_DynaLoader;
skip_all_without_unicode_tables();
-plan tests => 849; # Update this when adding/deleting tests.
+plan tests => 850; # Update this when adding/deleting tests.
run_tests() unless caller;
{ # [perl $132164]
fresh_perl_is('m m0*0+\Rm', "",{},"Undefined behavior in address sanitizer");
}
+ { # [perl #133642]
+ fresh_perl_is('m/((?<=(0?)))/', "Variable length lookbehind not implemented in regex m/((?<=(0?)))/ at - line 1.",{},"Was getting 'Double free'");
+ }
} # End of sub run_tests