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 /pod/perlreguts.pod | |
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 'pod/perlreguts.pod')
-rw-r--r-- | pod/perlreguts.pod | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/pod/perlreguts.pod b/pod/perlreguts.pod index 204993165c..9c54ec4aac 100644 --- a/pod/perlreguts.pod +++ b/pod/perlreguts.pod @@ -810,13 +810,12 @@ value to other engine implementations. =item C<swap> -C<swap> is an extra set of startp/endp stored in a C<regexp_paren_ofs> -struct. This is used when the last successful match was from the same pattern -as the current pattern, so that a partial match doesn't overwrite the -previous match's results. When this field is data filled the matching -engine will swap buffers before every match attempt. If the match fails, -then it swaps them back. If it's successful it leaves them. This field -is populated on demand and is by default null. +C<swap> formerly was an extra set of startp/endp stored in a +C<regexp_paren_ofs> struct. This was used when the last successful match +was from the same pattern as the current pattern, so that a partial +match didn't overwrite the previous match's results, but it caused a +problem with re-entrant code such as trying to build the UTF-8 swashes. +Currently unused and left for backward compatibility with 5.10.0. =item C<offsets> |