diff options
author | Marcus Holland-Moritz <mhx-perl@gmx.net> | 2007-08-18 03:55:37 +0200 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2007-08-18 11:15:19 +0000 |
commit | 6b1735164b8763a48a594aea37552f0f17eeeba5 (patch) | |
tree | 3a6f7666010673e332bb9b3c7ae882a764fca98d /regexec.c | |
parent | f233d283603b2a797a715547dc8cd2f426ef349f (diff) | |
download | perl-6b1735164b8763a48a594aea37552f0f17eeeba5.tar.gz |
TRIE must use 'yes' state transitions when more than one match possible to ensure proper scope cleanup.
Fix and test for issue raised in:
Subject: Very strange interaction between regex and lexical array in blead
Message-ID: <20070818015537.0088db31@r2d2>
p4raw-id: //depot/perl@31733
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -2937,7 +2937,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog) if ( got_wordnum ) { if ( ! ST.accepted ) { ENTER; - SAVETMPS; + /* SAVETMPS; */ /* XXX is this necessary? dmq */ bufflen = TRIE_INITAL_ACCEPT_BUFFLEN; sv_accept_buff=newSV(bufflen * sizeof(reg_trie_accepted) - 1); @@ -3148,18 +3148,10 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog) PL_reginput = (char *)ST.accept_buff[ best ].endpos; if ( !ST.jump || !ST.jump[ST.accept_buff[best].wordnum]) { scan = ST.B; - /* NOTREACHED */ } else { scan = ST.me + ST.jump[ST.accept_buff[best].wordnum]; - /* NOTREACHED */ - } - if (has_cutgroup) { - PUSH_YES_STATE_GOTO(TRIE_next, scan); - /* NOTREACHED */ - } else { - PUSH_STATE_GOTO(TRIE_next, scan); - /* NOTREACHED */ } + PUSH_YES_STATE_GOTO(TRIE_next, scan); /* NOTREACHED */ } /* NOTREACHED */ |