Debian Codegraph @

rhino/testsrc/tests/js1_5/Regress/regress-280769-2.js

raw symbols SCIP
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 var gTestfile = 'regress-280769-2.js';
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 280769;
9 var summary = 'Do not overflow 64K boundary in treeDepth';
10 var actual = 'No Crash';
11 var expect = /No Crash|InternalError: allocation size overflow|InternalError: script stack space quota is exhausted/;
12 var status;
13 var result;
14
15 printBugNumber(BUGNUMBER);
16 printStatus (summary);
17
18 status = summary + ' ' + inSection(1) + ' (new RegExp("0|...|99999") ';
19
20 try
21 {
22 var N = 100 * 1000;
23 var a = new Array(N);
24 for (var i = 0; i != N; ++i) {
25 a[i] = i;
26 }
27 var str = a.join('|'); // str is 0|1|2|3|...|<printed value of N -1>
28 var re = new RegExp(str);
29 re.exec(N - 1);
30 }
31 catch(ex)
32 {
33 actual = ex + '';
34 }
35
36 print('Done: ' + actual);
37
38 reportMatch(expect, actual, summary);
39
40
41