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 /regexp.h | |
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 'regexp.h')
-rw-r--r-- | regexp.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -88,7 +88,7 @@ typedef struct regexp_paren_pair { /* during matching */ \ U32 lastparen; /* last open paren matched */ \ U32 lastcloseparen; /* last close paren matched */ \ - regexp_paren_pair *swap; /* Swap copy of *offs */ \ + regexp_paren_pair *swap; /* Unused: 5.10.1 and later */ \ /* Array of offsets for (@-) and (@+) */ \ regexp_paren_pair *offs; \ /* saved or original string so \digit works forever. */ \ |