Correct stack unwinding inside recursions when seeing (*SKIP).

Fixes https://github.com/boostorg/regex/issues/152.
This commit is contained in:
jzmaddock
2021-10-20 12:12:57 +01:00
parent 75600e3519
commit 354e02f141
2 changed files with 5 additions and 1 deletions

View File

@ -417,7 +417,8 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_startmark()
{
// Must be unwinding from a COMMIT/SKIP/PRUNE and the independent
// sub failed, need to unwind everything else:
while(unwind(false));
while (m_backup_state->state_id)
unwind(false);
return false;
}
#if !defined(BOOST_NO_EXCEPTIONS)