diff options
author | George Greer <greerga@m-l.org> | 2009-07-12 14:53:29 -0400 |
---|---|---|
committer | Yves Orton <demerphq@gemini.(none)> | 2009-07-26 23:28:59 +0200 |
commit | e9105d30edfbaa7f444bc7984c9bafc8e991ad12 (patch) | |
tree | 02f4a68781026819995c672ba8325caee5661d7f /regcomp.c | |
parent | bd54d59dd6a665482e3984318596e9a54427f810 (diff) | |
download | perl-e9105d30edfbaa7f444bc7984c9bafc8e991ad12.tar.gz |
much better swap logic to support reentrancy and fix assert failure
Commit c74340f9 added backreferences as well as the idea of a ->swap
regex pointer to keep track of the match offsets in case of backtracking.
The problem is that when Perl re-enters the regex engine to handle
utf8::SWASHNEW, the ->swap is not saved/restored/cleared so any capture
from the utf8 (Perl) code could inadvertently modify the regex match
data that caused the utf8 swash to get built.
This change should close out RT #60508
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 2 |
1 files changed, 0 insertions, 2 deletions
@@ -9414,7 +9414,6 @@ Perl_pregfree2(pTHX_ REGEXP *rx) if (r->saved_copy) SvREFCNT_dec(r->saved_copy); #endif - Safefree(r->swap); Safefree(r->offs); } @@ -9474,7 +9473,6 @@ Perl_reg_temp_copy (pTHX_ REGEXP *rx) ret->saved_copy = NULL; #endif ret->mother_re = rx; - ret->swap = NULL; return ret_x; } |