Bug 736591 - Reduce the amount of string allocation attempted in ecma_5/RegExp/regress-617935.js to hopefully reduce intermittent orange. (The limit the test previously checked is no longer correct, so the allocation need not be repeated quite so many times as it was before this patch.) r=luke

This commit is contained in:
Jeff Walden 2012-04-16 17:34:36 -07:00
parent 0b4dedebcb
commit 4c415c06fb

View File

@ -22,15 +22,15 @@ foo += "a";
var bar = "bbbbbbbbbbbbbbbb";
/* Make len(bar) 65536 */
for (i = 0; i < 12; ++i) {
/* Make len(bar) 8192 */
for (i = 0; i < 9; ++i) {
bar += bar;
}
/*
* Resulting string should be
* len(foo)*len(bar) = (2^10 * 32 + 1) * 65536 = 2147549184
* which will be negative as jsint
* len(foo) * len(bar) = (2**10 * 32 + 1) * 8192 = 268443648
* which will be larger than the max string length (2**28, or 268435456).
*/
try {
foo.replace(/[a]/g, bar);
@ -39,4 +39,4 @@ try {
}
reportCompare(true, true, "No crash occurred.");
print("All tests passed!");
print("Tests complete");