| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
gTestfile = 'regress-324422-1.js'; |
| 8 |
|
| 9 |
var summary = "Do not crash creating XML object with long initialiser"; |
| 10 |
|
| 11 |
var BUGNUMBER = 324422; |
| 12 |
var actual = 'No Crash'; |
| 13 |
var expect = 'No Crash'; |
| 14 |
|
| 15 |
printBugNumber(BUGNUMBER); |
| 16 |
START(summary); |
| 17 |
|
| 18 |
if (typeof document == 'undefined') |
| 19 |
{ |
| 20 |
printStatus ("Expect possible out of memory error"); |
| 21 |
expectExitCode(0); |
| 22 |
expectExitCode(5); |
| 23 |
} |
| 24 |
var str = '<fu>x</fu>'; |
| 25 |
|
| 26 |
for (var icount = 0; icount < 20; icount++) |
| 27 |
{ |
| 28 |
str = str + str; |
| 29 |
} |
| 30 |
|
| 31 |
printStatus(str.length); |
| 32 |
|
| 33 |
try |
| 34 |
{ |
| 35 |
var x = new XML('<root>' + str + '</root>'); |
| 36 |
} |
| 37 |
catch(ex) |
| 38 |
{ |
| 39 |
expect = 'InternalError: script stack space quota is exhausted'; |
| 40 |
actual = ex + ''; |
| 41 |
print('Caught ' + ex); |
| 42 |
} |
| 43 |
|
| 44 |
TEST(1, expect, actual); |
| 45 |
|
| 46 |
END(); |