[PATCH] D28224: [libcxx, regex] Throw exception after too many steps.

2017-09-12 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. Applied as revision 313056 (with minor editing) https://reviews.llvm.org/D28224 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D28224: [libcxx, regex] Throw exception after too many steps.

2017-01-02 Thread Tim Shen via Phabricator via cfe-commits
timshen added a comment. I defined and exported a macro _LIBCPP_REGEX_COMPLEXITY_FACTOR in the hope that even when the library is shipped to the user, and when the user finds the factor to be inappropriate, they can override it. I'm not aware of and exported macro policy though, please advice.

[PATCH] D28224: [libcxx, regex] Throw exception after too many steps.

2017-01-02 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 82840. timshen added a comment. Detect user defined _LIBCPP_REGEX_COMPLEXITY_FACTOR first. https://reviews.llvm.org/D28224 Files: libcxx/include/regex libcxx/test/std/re/re.alg/re.alg.match/exponential.pass.cpp libcxx/test/std/re/re.alg/re.alg.search/

[PATCH] D28224: [libcxx, regex] Throw exception after too many steps.

2017-01-02 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added a reviewer: mclow.lists. timshen added a subscriber: cfe-commits. Herald added a reviewer: EricWF. This prevents the backtracking regex engines from "hanging forever" under certain input. https://reviews.llvm.org/D28224 Files: libcxx/include/regex