Skip to content

Commit 7a3636b

Browse files
LaszloLangodbatyai
authored andcommitted
Remove executor steps/match limit from RegExp.
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
1 parent 9ab0f23 commit 7a3636b

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

jerry-core/ecma/operations/ecma-regexp-object.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -297,13 +297,6 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
297297

298298
while ((op = re_get_opcode (&bc_p)))
299299
{
300-
if (re_ctx_p->match_limit >= RE_EXECUTE_MATCH_LIMIT)
301-
{
302-
ret_value = ecma_raise_range_error ("RegExp executor steps limit is exceeded.");
303-
return ret_value;
304-
}
305-
re_ctx_p->match_limit++;
306-
307300
switch (op)
308301
{
309302
case RE_OP_MATCH:
@@ -1245,7 +1238,6 @@ ecma_regexp_exec_helper (ecma_value_t regexp_value, /**< RegExp object */
12451238
re_matcher_ctx_t re_ctx;
12461239
re_ctx.input_start_p = iterator.buf_p;
12471240
re_ctx.input_end_p = iterator.buf_p + iterator.buf_size;
1248-
re_ctx.match_limit = 0;
12491241
re_ctx.recursion_depth = 0;
12501242

12511243
/* 1. Read bytecode header and init regexp matcher context. */

jerry-core/ecma/operations/ecma-regexp-object.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@
3434
*/
3535
#define RE_EXECUTE_RECURSION_LIMIT 1000
3636

37-
/**
38-
* Limit of RegExp execetur matching steps
39-
*/
40-
#define RE_EXECUTE_MATCH_LIMIT 10000
41-
4237
/**
4338
* RegExp flags
4439
*/
@@ -54,7 +49,6 @@ typedef struct
5449
lit_utf8_iterator_t *saved_p; /**< saved result string pointers, ECMA 262 v5, 15.10.2.1, State */
5550
const lit_utf8_byte_t *input_start_p; /**< start of input pattern string */
5651
const lit_utf8_byte_t *input_end_p; /**< end of input pattern string */
57-
uint32_t match_limit; /**< matching limit counter */
5852
uint32_t recursion_depth; /**< recursion depth counter */
5953
uint32_t num_of_captures; /**< number of capture groups */
6054
uint32_t num_of_non_captures; /**< number of non-capture groups */

0 commit comments

Comments
 (0)