blob: 383285391145d897d0bba5a7b7d4131701765ee7 [file] [log] [blame]
Test that we do not overflow the stack while handling regular expressions
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS new RegExp(Array(500000).join("(") + "a" + Array(500000).join(")")) threw exception RangeError: Out of memory: Invalid regular expression: too many nested disjunctions.
Creating RegExp at depth 0
PASS new RegExp(Array(500000).join("(") + "a" + Array(500000).join(")")) threw exception RangeError: Out of memory: Invalid regular expression: too many nested disjunctions.
Creating RegExp at depth 10
PASS new RegExp(Array(500000).join("(") + "a" + Array(500000).join(")")) threw exception RangeError: Out of memory: Invalid regular expression: too many nested disjunctions.
Creating RegExp at depth 20
PASS new RegExp(Array(500000).join("(") + "a" + Array(500000).join(")")) threw exception RangeError: Out of memory: Invalid regular expression: too many nested disjunctions.
Creating RegExp at depth 30
PASS new RegExp(Array(500000).join("(") + "a" + Array(500000).join(")")) threw exception RangeError: Out of memory: Invalid regular expression: too many nested disjunctions.
Creating RegExp at depth 40
PASS new RegExp(Array(500000).join("(") + "a" + Array(500000).join(")")) threw exception RangeError: Out of memory: Invalid regular expression: too many nested disjunctions.
Creating RegExp at depth 50
PASS new RegExp(Array(500000).join("(") + "a" + Array(500000).join(")")) threw exception RangeError: Out of memory: Invalid regular expression: too many nested disjunctions.
Creating RegExp at depth 60
PASS new RegExp(Array(500000).join("(") + "a" + Array(500000).join(")")) threw exception RangeError: Out of memory: Invalid regular expression: too many nested disjunctions.
Creating RegExp at depth 70
PASS new RegExp(Array(500000).join("(") + "a" + Array(500000).join(")")) threw exception RangeError: Out of memory: Invalid regular expression: too many nested disjunctions.
Creating RegExp at depth 80
PASS new RegExp(Array(500000).join("(") + "a" + Array(500000).join(")")) threw exception RangeError: Out of memory: Invalid regular expression: too many nested disjunctions.
Creating RegExp at depth 90
PASS new RegExp(Array(500000).join("(") + "a" + Array(500000).join(")")) threw exception RangeError: Out of memory: Invalid regular expression: too many nested disjunctions.
Creating RegExp at depth 100
PASS new RegExp(Array(500000).join("(") + "a" + Array(500000).join(")")) threw exception RangeError: Out of memory: Invalid regular expression: too many nested disjunctions.
PASS new RegExp(expression) threw exception SyntaxError: Invalid regular expression: regular expression too large.
PASS successfullyParsed is true
TEST COMPLETE