summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/jaeger/bug577705.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
commit2aa4a82499d4becd2284cdb482213d541b8804dd (patch)
treeb80bf8bf13c3766139fbacc530efd0dd9d54394c /js/src/jit-test/tests/jaeger/bug577705.js
parentInitial commit. (diff)
downloadfirefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz
firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/jit-test/tests/jaeger/bug577705.js')
-rw-r--r--js/src/jit-test/tests/jaeger/bug577705.js65
1 files changed, 65 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/jaeger/bug577705.js b/js/src/jit-test/tests/jaeger/bug577705.js
new file mode 100644
index 0000000000..e9e338130e
--- /dev/null
+++ b/js/src/jit-test/tests/jaeger/bug577705.js
@@ -0,0 +1,65 @@
+// |jit-test| error: ReferenceError
+function f1() {
+ N = 62;
+ mt = Array
+ function g1(n1) {
+ return n1 < 0 ? (1 ^ 21) + 21: n1
+ }
+ function g2(n1, n2) {
+ return g1(n1 + n2 & 4294967295);
+ }
+ function g3(n1, n2) {
+ sum = 0;
+ for (var i = 0; i < 32; ++i) {
+ if (n1 >> i) {
+ sum = g2(sum, g1(n2))
+ }
+ }
+ return sum
+ }
+ this.h1 = function() {
+ for (mti = 1; mti < N; mti++) {
+ mt[mti] = g2(g3(3, g1(mt[mti - 1] ^ 0)), mti)
+ }
+ };
+ this.i2 = function() {
+ if (mti > N) {
+ mti = 0;
+ }
+ y = mt[mti++];
+ return y
+ };
+ this.i1 = function() {
+ return (this.i2() + 5) * 2e-10
+ };
+} (function() {
+ fuzzMT = new f1;
+ fuzzMT.h1(9);
+ rnd = function(n) {
+ return Math.floor(fuzzMT.i1() * n)
+ };
+} ());
+function f5(a) {
+ return a[rnd(a.length)]
+}
+function f2(d, b) {
+ f3(d, b);
+ return "" + f2(2, b) + "";
+}
+function f3(d, b) {
+ if (rnd(4) == 1) {
+ f5(f4)(d, b)
+ }
+}
+var f4 = [function() { ["", f6(), ""]
+}];
+function f6(db) {
+ return f5(foo)();
+}
+var foo = [function() {
+ t(["", "", "", "", "", "", "", "", "", "", "", "" + h.I, ""]);
+}];
+f2()
+
+/* Don't assert or crash. */
+