Skip to content

Commit

Permalink
Publish PREG_JIT_STACKLIMIT_ERROR in hhi and use it in the HSL
Browse files Browse the repository at this point in the history
Reviewed By: DavidSnider

Differential Revision: D39677047

fbshipit-source-id: bf89d8c32b24e41c0682e9976dd94e10eb92ba1c
  • Loading branch information
alexeyt authored and facebook-github-bot committed Oct 27, 2022
1 parent 3e69497 commit cef180f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions hphp/hack/hhi/stdlib/builtins_preg.hhi
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ const int PREG_RECURSION_LIMIT_ERROR = 0;
const int PREG_BAD_UTF8_ERROR = 0;
const int PREG_BAD_UTF8_OFFSET_ERROR = 0;
const int PREG_BAD_REGEX_ERROR = 0;
const int PREG_JIT_STACKLIMIT_ERROR = 0;
const int PREG_GREP_INVERT = 0;
const string PCRE_VERSION = '';
1 change: 1 addition & 0 deletions hphp/hsl/src/regex/exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public function __construct(Pattern<Match> $pattern, int $code)[] {
\PREG_BAD_UTF8_ERROR => 'Bad UTF8 error',
\PREG_BAD_UTF8_OFFSET_ERROR => 'Bad UTF8 offset error',
\PREG_BAD_REGEX_ERROR => 'Regex failed to compile',
\PREG_JIT_STACKLIMIT_ERROR => 'PCRE JIT stack limit error',
];
parent::__construct(
Str\format(
Expand Down

0 comments on commit cef180f

Please sign in to comment.