summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/regexp/bug1640479.js
blob: ff166d64516196fefea301913825fbf32b13e873 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// |jit-test| skip-if: !('oomTest' in this)

var failures = 0;
var i = 0;

function foo() {
    var e;
    var r = RegExp("(?<_" + (i++) + "a>)");
    try { e = r.exec("a"); } catch {}
    e = r.exec("a");
    if (e.groups === undefined) failures++;
}

oomTest(foo);
assertEq(failures, 0);