summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/bug1782468-ptrdiff-veclen.js
blob: b6948a38d308d24fc84cbf897166ea71258895d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// |jit-test| skip-if: getBuildConfiguration("android")

try {
  a = {};
  for (b = 0; b < 24; b++)
    a += a;
  Function(a, a, a);
  assertEq(true, false, "allocation overflow expected");
} catch (e) {
  if (getBuildConfiguration("pointer-byte-size") == 4) {
    assertEq((e + "").includes("InternalError: allocation size overflow"), true);
  } // else on 64-bit, it will be a SyntaxError for invalid code.
}