Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
Update max stack depth values for regex parser
Browse files Browse the repository at this point in the history
Summary:
This diff updates the max stack depth conditions to match those in
JSParserImpl.h. In addition, it increases the minimum stack depth
limit to 256 since some of our tests rely go to a depth of 200.

Reviewed By: avp

Differential Revision: D22341516

fbshipit-source-id: 4feddb6353f7549b54cd1d8e401d74766a1ed7f7
  • Loading branch information
neildhar authored and facebook-github-bot committed Jul 2, 2020
1 parent 4f15a2e commit 0374df0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/Regex/RegexParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ class Parser {
// overflow for overly complex expressions.
static constexpr uint32_t kMaxParseDepth =
#ifdef HERMES_LIMIT_STACK_DEPTH
128
#elif defined(_MSC_VER) && defined(__clang__) && defined(HERMES_SLOW_DEBUG)
128
256
#elif defined(_MSC_VER) && defined(HERMES_SLOW_DEBUG)
256
#elif defined(_MSC_VER)
Expand Down

0 comments on commit 0374df0

Please sign in to comment.