This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch 2/3] Make regex's infinite loop detection accurate


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]