[Patch 2/3] Make regex's infinite loop detection accurate
Tim Shen
timshen91@gmail.com
Fri Apr 25 20:40:00 GMT 2014
regex_match("", regex("(?:)*") will cause segfault because the
infinite loop detection (writeen by me) is stupid. :O
Instead of checking begins and ends, now the executor tracks repeating
count for every loop node (typically generated from the Kleene star
*).
It slows down the executor a bit (from 1.8s to 2.0s in my machine),
but it's about the correctness.
The whole patch series are booted and tested, but this one is not
separately tested.
Thanks!
--
Regards,
Tim Shen
More information about the Libstdc++
mailing list