Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ufuzz failure #5583

Closed
alexlamsl opened this issue Jul 29, 2022 · 0 comments · Fixed by #5585
Closed

ufuzz failure #5583

alexlamsl opened this issue Jul 29, 2022 · 0 comments · Fixed by #5585
Labels

Comments

@alexlamsl
Copy link
Collaborator

// original code
// (beautified)
var _calls_ = 10, a = 100, b = 10, c = 0;

{
    var expr1 = a++ + function undefined() {
        {
            var brake2 = 5;
            L10368: do {
                switch (a++ + ({} >> "undefined" <= 23..toString() >> undefined ^ (null % 25 ^ (0 && "number")))) {
                  default:
                  case --b + (undefined && undefined[-((-0 % -4 < (c = c + 1, -1)) - ((true, 
                    {}) - (false || -3)))]):
                    {
                        var brake4 = 5;
                        while (a++ + (undefined && typeof undefined.null == "function" && --_calls_ >= 0 && (a++ + +((25 * "number" ^ ([] && -5)) != (([ , 0 ].length === 2) < Infinity ^ true == "b")), 
                        undefined.null)(-1)) && --brake4 > 0) {
                            continue L10368;
                        }
                    }
                    break;

                  case a++ + []:
                    var b = a++ + [ undefined ].length;
                    if (a++ + (((-1 || 24..toString()) << ("undefined" < "foo")) % ((undefined && (undefined.a = "c" !== "bar")) % ("function" + "function")) || a || 3).toString()) {
                        var brake8 = 5;
                        L10369: while ((c = c + 1) + (--b + /[abc4]/g.exec((--b + --b || b || 5).toString()) ? a++ : b = (!22 || 0 > 23..toString()) >>> (-3 > "b" >= (-1 < undefined))) && --brake8 > 0) {
                            b = a;
                        }
                    } else {
                        var brake10 = 5;
                        do {
                        } while (a++ + ++b && --brake10 > 0);
                    }
                    break;

                  case --b + (b + 1 - .1 - .1 - .1):
                    break;
                }
            } while ((c = c + 1) + [ ...[ {
                value: /[abc4]/g.exec((delete a || b || 5).toString()),
                "": ((b = a) || a || 3).toString(),
                "": a++ + /[abc4]/g.exec((a++ + (c = 1 + c, (c = c + 1, "c" || "object") ^ (c = c + 1, 
                0) & "object" << "b") || b || 5).toString()),
                Infinity: typeof undefined === "symbol",
                value: --b + {}.done
            }[a++ + {
                1.5: b,
                b: b
            }], a++ + (typeof f1 == "function" && --_calls_ >= 0 && f1()), typeof f1 == "function" && --_calls_ >= 0 && f1(..."" + undefined, ((c = c + 1) + /[abc4]/g.exec(((c = 1 + c, 
            ([] >= 2 == 5 < true) + ((true == 22) >= (Infinity || []))) || b || 5).toString()) || 4).toString()[typeof f0 == "function" && --_calls_ >= 0 && f0()]) ], b-- ].undefined && --brake2 > 0);
        }
    }();
    for (var key1 in expr1) {
        c = 1 + c;
        var bar = expr1[key1];
        var await_2 = a++ + +function yield_2() {
            {
                var brake13 = 5;
                L10370: while (typeof (yield_2 && yield_2[--b + --b]) && --brake13 > 0) {
                    (c = c + 1) + (b = a);
                }
            }
        }(), a_2 = /[abc4]/g.exec((key1 && key1.null || b || 5).toString());
    }
}

if (b--) {
    switch (a && a.undefined) {
      case (c = c + 1) + (a *= --b + (a += (c = c + 1) + -5)):
        for (var brake17 = 5; a++ + -5 && brake17 > 0; --brake17) {
            --b + ([ typeof a == "function" && --_calls_ >= 0 && a(..."" + a, ...[ (c = 1 + c, 
            ((a -= 0 ^ -0) ^ null & "number") == (c = c + 1, 38..toString() <= "")), (c = 1 + c, 
            (a && (a.undefined = +0 === -3 <= "function")) | -0 << [] << "b" / [ , 0 ][1]), (c = 1 + c, 
            (null === "object") >>> (a && (a[c = 1 + c, (([ , 0 ].length === 2 ^ 3) == (c = c + 1, 
            -4)) - (5 ^ "number") / (/[a2][^e]+$/ <= 22)] *= "a" >= 0)) != (true === "a" & ("foo", 
            -0))), ..."" + a, (c = 1 + c, (-3 === "") <= -5 % -4 !== (a && (a.value ^= 3 || 25)) % (25 ^ 25)) ], --b + a++) ].get ? [ a++ + a, (c = c + 1) + {}[b--], (c = c + 1) + (--b + (--b + !function() {
            }() || 9).toString()[--b + ~a] || a || 3).toString(), --b + [ (c = c + 1) + (a && a.b) ], a++ ][(b => {
                var yield;
                try {
                    c = 1 + c, (-4 >= "c") - ("object" != ([ , 0 ].length === 2)) < ("object" >>> 5 == [] - ([ , 0 ].length === 2));
                } catch (NaN) {
                    c = 1 + c, NaN * Infinity || (yield = 1 & -1), (NaN != "undefined") <= (false || "c");
                    c = 1 + c, -5 / this * ({} % "number") << (/[a2][^e]+$/ * undefined & !true);
                }
            })()] : 1 === 1 ? a : b);
        }
        {
            var bar_2 = function f0(b_1, ...c_2) {
                {
                    return --b + [ b_1 && b_1[[ , (c = 1 + c, (void -0 && "number" << undefined) !== 5 + "bar" >= "undefined" >>> -3), ..."" + b_1 ]], --b, c_2 = a++ + (typeof f2 == "function" && --_calls_ >= 0 && f2(this)) ];
                }
            }(1);
        }
        break;

      case bar_2 && typeof bar_2.done == "function" && --_calls_ >= 0 && bar_2.done(2, ..."" + bar_2, true):
        break;

      case (c = c + 1) + [ bar_2 && typeof bar_2.length == "function" && --_calls_ >= 0 && ({
            value: --b + -b,
            "": bar_2 && bar_2.value
        }, bar_2.length)("c", 0 === 1 ? a : b, [ , 0 ].length === 2), (c = c + 1) + bar_2 ? 0 === 1 ? a : b : [ , 0 ][1], (c = c + 1) + (([] & 3 & ("number", 
        2)) > (c = c + 1, [ , 0 ][1] & 2)), "object" in [ (typeof -b || a || 3).toString(), [] in {
            async: a++ + (typeof undefined_1 != "object"),
            var: 0 === 1 ? a : b
        } ? (c = c + 1) + /[abc4]/.test(((a++ + ((c = c + 1) + --a || a || 3).toString() || 8).toString()[b += a] || b || 5).toString()) : (c = c + 1) + [][bar_2], --b + (0 === 1 ? a : b), --b + (NaN in [ b--, (c = c + 1) + Infinity, bar_2 && bar_2[(c = c + 1) + ((bar_2 && (bar_2[c = 1 + c, 
        ("" <= "undefined") % (2 || -4), (c = c + 1, "number") & /[a2][^e]+$/ === -0] += 0 << ([ , 0 ].length === 2))) > 5 / Infinity > (delete "foo" != (NaN != ([ , 0 ].length === 2))))], --b + {
            [+function() {
            }()]: a++ + ((2 != 4) * (false * true) === (true <= "function" === -2 / 38..toString())),
            a: bar_2 && bar_2[c = 1 + c, ({}, "number") / ([ , 0 ].length === 2 | [ , 0 ].length === 2) + (bar_2 -= {} % 4 != ("", 
            "undefined"))],
            [{}.null]: --b + +(1 / "bar" != ([ , 0 ].length === 2 != "c") ^ (bar_2 && ({
                Infinity: bar_2[bar_2 && bar_2[c = 1 + c, (Infinity & "function") > (23..toString() || [ , 0 ].length === 2) | (-5 ^ null) <= (2 | "object")]]
            } = {
                Infinity: true * "number" & 0 - 5
            }))),
            done: (c = c + 1) + a--,
            ...typeof f2 == "function" && --_calls_ >= 0 && f2()
        }.value, --b + (bar_2 && bar_2.then) ]) ], [].c ].value:
        {
            var brake27 = 5;
            while (((1 === 1 ? a : b) || 3).toString()[a++ + (1 === 1 ? a : b)] && --brake27 > 0) {
                var brake28 = 5;
                do {
                    (c = c + 1) + [][a++ + [ "number" in {
                        b: (c = 1 + c, bar_2 && (bar_2[a++] = (bar_2 && (bar_2.static >>= /[a2][^e]+$/ >>> -1 | -1 < "object")) & (3 % 38..toString() ^ [] != this))),
                        in: (c = 1 + c, (-5 - 0 == ([ , 0 ][1] === ([ , 0 ].length === 2))) > (bar_2 += "bar" < -5 !== (undefined && 23..toString()))),
                        static: (c = 1 + c, -3 >= 5 <= (/[a2][^e]+$/, -2) | (bar_2 && (bar_2[typeof bar_2 == "function" && --_calls_ >= 0 && bar_2()] *= 24..toString() != [] === ([] & "object"))))
                    }, bar_2 && typeof bar_2.static == "function" && --_calls_ >= 0 && bar_2.static((c = 1 + c, 
                    (2 <= 24..toString()) - (-4 <= "b") >>> (-3 - "function" && 5 ^ 38..toString())), 23..toString(), 2), ((c = 1 + c, 
                    1 !== undefined & "a" < -5 ^ (4 < []) << /[a2][^e]+$/ + true) || a || 3).toString() ]];
                } while ((2 !== "a") % ("bar", "c") % (1 <= 24..toString() || /[a2][^e]+$/ ^ "function") && --brake28 > 0);
            }
        }
        if ({
            next: 4 in [ NaN, (c = c + 1) + (bar_2 <<= a++ + a--) ],
            in: bar_2 && typeof bar_2.c == "function" && --_calls_ >= 0 && bar_2.c(a++ + (({} < "foo") + (NaN && "foo") ^ ~"bar" & void "b"))
        }[a++ + (b = a)]) {
            var bar_2 = --b + /[abc4]/g.exec((--b + (b += a) || b || 5).toString()), bar_1 = b += a;
        } else {
            for (var brake32 = 5; (c = c + 1) + [ --b + (typeof bar_2 == "function" && --_calls_ >= 0 && bar_2([ (c = 1 + c, 
            (bar_2 && (bar_2.done = -[] || NaN << NaN)) << (bar_1 <<= (c = c + 1, 
            /[a2][^e]+$/) << ("b" != "b"))), (c = 1 + c, (c = c + 1, undefined <= Infinity) & (bar_2 && (bar_2.static &= NaN | true)) / (true !== "bar")), (c = 1 + c, 
            delete NaN <= ({} || -1) > (undefined > -1) >>> ("undefined" | -3)), (c = 1 + c, 
            bar_2 && (bar_2.null <<= (bar_1 += (-1 | Infinity) + ("number" << 24..toString())) !== /[a2][^e]+$/ >= [ , 0 ][1] > [] << -5)) ].get)) ] && brake32 > 0; --brake32) {
                var bar_2 = function f1(bar_1, bar_2) {
                    {
                        {
                        }
                    }
                    --b + (b ^= a);
                }();
            }
        }
        break;

      case {}:
        {
            var brake37 = 5;
            while ((c = c + 1) + (bar_2 && typeof bar_2.set == "function" && --_calls_ >= 0 && (--b + /[abc4]/.test((--b + delete (bar_1 && (bar_1.next += (true >>> Infinity && 3 === [ , 0 ][1]) + (([ , 0 ][1] >= 38..toString()) << ("c" | NaN)))) || b || 5).toString()), 
            bar_2.set)([ , 0 ][1])) && --brake37 > 0) {
                var bar_2_2 = function f2(b) {
                    +(bar_1 && (bar_1[(--b + [ (c = 1 + c, "object" + -2 << (bar_2 += 22 >= []) && delete "foo" | -5 & "function"), (c = 1 + c, 
                    void ((-2 | 5) === -4 / false)), (c = 1 + c, (bar_1 = [] * {}) % (bar_2 += "bar" ^ 2) & (bar_2 += 38..toString() + "foo" + ([ , 0 ][1] || "undefined"))), (c = 1 + c, 
                    25 % -4 * ("function" & 2) * ("function" >> {} === ("b" ^ -5))), (c = 1 + c, 
                    (b && (b.NaN += ("a" == [ , 0 ][1]) < (c = c + 1, "function"))) & ("c" || /[a2][^e]+$/) >>> 24..toString() % ([ , 0 ].length === 2)) ][c = 1 + c, 
                    (("foo" != -5) - ("b" !== ([ , 0 ].length === 2))) * (bar_2 && (bar_2[--b + {
                        Infinity: (c = 1 + c, (("object" != false) - (bar_2 && (bar_2[c = 1 + c, 
                        (-5 || [], "c" >= "bar") > (24..toString() != -5 ^ "foo" !== -4)] += -2 ^ -5))) / ({} >= -5 <= (bar_1 += 25 >>> 25))),
                        async: (c = 1 + c, (-1 - 3, 1 == -2) && (3 ^ undefined) <= ("number", 
                        23..toString())),
                        a: (c = 1 + c, "bar" << 2 && "foo" < -4 && (3 >> /[a2][^e]+$/) + (undefined < 2))
                    }[c = 1 + c, -("number", NaN) >>> (25 != "function") % (24..toString() | "undefined")]] += ("foo", 
                    "object") < ("a" > {})))] || a || 3).toString()] = (c = c + 1, 
                    2 != "b") * ("number" !== "bar" | Infinity >= undefined)));
                    {
                        var b_1 = function f3(yield, b_2) {
                            switch (c = 1 + c, b = ((c = c + 1, this) < (b_2 && (b_2[c = 1 + c, 
                            (this > 23..toString() >= (24..toString() > 0)) >> (NaN == [ , 0 ][1] != 1 - 1)] = 5 >> this))) >> (4 * "" < (24..toString() === undefined))) {
                              case c = 1 + c, -3 > 22 || "" == -2 || (bar_1 += (c = c + 1, 
                                1) != ("undefined" != "bar")):
                                ;
                                break;

                              case c = 1 + c, (0 != this) + ({} >>> false) & (c = c + 1, 
                                25 >> NaN):
                                ;
                                break;

                              case c = 1 + c, -("a" - {}) / (true << "bar" !== -3 >>> ""):
                                ;

                              case c = 1 + c, (-3 & 22 || ~"function") == (-4 !== "c" && 24..toString() == 23..toString()):
                                ;
                            }
                            {
                                var brake42 = 5;
                                L10371: while ((c = 1 + c, ("a" === -2 || {} - 2) * ((38..toString() & 4) > ({} || -4))) && --brake42 > 0) {
                                    c = 1 + c, (24..toString() << 24..toString() <= (b = 22 >>> 38..toString())) / ((-0 && -1) != 1 / "c");
                                }
                            }
                        }(void (-5 / 22 >>> (/[a2][^e]+$/ & "function") < "function" / 38..toString() + "function" * 23..toString()), a++ + ++a, 38..toString());
                    }
                }("a", 23..toString(), function a_1() {}());
            }
        }
        break;
    }
} else {
    var a_1 = function bar_2(let_1, bar_2, async_2) {
        var bar_2_2 = a++ + [ ..."" + bar_2 ].a;
        if (a++ + /[abc4]/g.exec((undefined in {
            ...bar_2_2,
            get: typeof f2 == "function" && --_calls_ >= 0 && f2(--b + --b, "b"),
            "-2": --b + ("bar" in [ (bar_2_2 && (bar_2_2[c = 1 + c, (bar_2 && (bar_2[c = 1 + c, 
            (null != []) % (([ , 0 ].length === 2) >= 0) + (bar_2 && ({
                foo: bar_2[b = a]
            } = {
                foo: (bar_2_2 && ({
                    value: bar_2_2.get
                } = {
                    value: Infinity === "bar"
                })) % ("c" >= "foo")
            }))] |= /[a2][^e]+$/ >>> 1)) >> ([ , 0 ][1] ^ 38..toString()) ^ ("object" ^ 23..toString()) >>> (let_1 && (let_1.next += "function" === 0))] ^= 5 != this)) + "c" / 0 | (-5 ^ 4) < "object" - -1, , --b + /[abc4]/.test(((c = 1 + c, 
            [ , 0 ][1] <= "a" === ("b", -1), async_2 = -5 << "number" ^ (bar_2 && (bar_2[c = 1 + c, 
            (c = c + 1, "object" === -0) ^ ([] * [] | (bar_2 && ([ bar_2.then ] = [ 4 == null ])))] = 2 ^ -2))) || b || 5).toString()), --b + ((c = 1 + c, 
            (0 >> "undefined" === undefined < null) < (/[a2][^e]+$/ ^ [ , 0 ].length === 2 || this && -0)) || a || 3).toString(), (c = c + 1) + {
                get: (c = 1 + c, (-4 >>> 0, /[a2][^e]+$/ | "number") << ({} << null || 38..toString() != "")),
                static: (c = 1 + c, ("b" & NaN) === ([ , 0 ].length === 2) < "" || {} === "b" | 0 + "a"),
                3: (c = 1 + c, ([ , 0 ][1] << 2 != (this ^ "")) >= ("c" >= -0) - ![]),
                undefined: (c = 1 + c, (0 > 0 == (38..toString() ^ 1)) >= (({} && -4) == 38..toString() < "function"))
            }[c = 1 + c, (0 & 2) % ("object" >> -5) + (38..toString() + "number" && (-5 && 25))] ]),
            [{
                Infinity: 22
            }[0 === 1 ? a : b]]: --b + void ((3 <= -3) / ({} >>> 0) == (-2 / 25 ^ ("c" ^ true))),
            undefined: a++ + (0 === 1 ? a : b)
        } || b || 5).toString())) {
            var expr47 = --b + typeof -((c = c + 1, c = c + 1, -3) >> (1 % "c" << (false << 25)));
            for (var key47 in expr47) {
                c = 1 + c;
                var a_2 = expr47[key47];
                {
                    var brake48 = 5;
                    while (bar_2 && --brake48 > 0) {
                        var bar_2_2_2 = function a_2_1(Infinity_1, a_2) {
                            {
                                var brake51 = 5;
                                L10372: while ((c = 1 + c, ("" >> [] >= (4 === NaN)) >> (bar_2 && (bar_2.next = undefined / {} & ("bar" | 24..toString())))) && --brake51 > 0) {
                                    c = 1 + c, (c = c + 1, 3) + (true === -3) << (bar_1 = -0 + -0 | "function" != this);
                                }
                            }
                        }(a++ + (0 === 1 ? a : b), -1, (c = 1 + c, (-1 >> -1 == 5 << "") > (let_1 && (let_1[c = 1 + c, 
                        (0 ^ -3) >= (c = c + 1, 5) >= (-3 == "bar" == (c = c + 1, 
                        0))] ^= 2 - 25)) - (bar_2_2 |= Infinity & "foo")) ? (c = 1 + c, 
                        ("undefined" / {} != 1 >> "b") > ((/[a2][^e]+$/ != undefined) >= {} % "a")) : (c = 1 + c, 
                        (-2 >>> "object") - (-4 < /[a2][^e]+$/) & ("object" ^ [] ^ /[a2][^e]+$/ <= 5)));
                    }
                }
            }
        }
    }(delete (bar_2 && (bar_2.foo += (bar_2 && (bar_2[a++ + b--] = ([ , 0 ][1] || Infinity) !== ("" ^ NaN))) / (c = c + 1, 
    22 & /[a2][^e]+$/))), 2, a++ + a_1);
}

console.log(null, a, b, c, Infinity, NaN, undefined);
// uglified code
// (beautified)
var key1, _calls_ = 10, a = 100, b = 10, c = 0, expr1 = a++ + function undefined() {
    var brake2 = 5;
    do {
        switch (a++ + ({} >> "undefined" <= 23..toString() >> undefined ^ 0)) {
          default:
          case --b + (undefined && undefined[-((-0 < (c += 1, -1)) - ({} - -3))]):
            var brake4 = 5;
            if (!(a++ + (undefined && "function" == typeof undefined.null && 0 <= --_calls_ && (a++, 
            undefined.null)(-1)) && 0 < --brake4)) {
                break;
            }

          case a++ + []:
            var b = a++ + [ undefined ].length;
            if (a++ + (-1 % ((undefined && (undefined.a = !0)) % "functionfunction") || a || 3).toString()) {
                for (var brake8 = 5; (c += 1) + (--b + /[abc4]/g.exec((--b + --b || b || 5).toString()) ? a++ : b = (23..toString() < 0) >>> (-1 < undefined <= !1)) && 0 < --brake8; ) {
                    b = a;
                }
            } else {
                for (var brake10 = 5; a++ + ++b && 0 < --brake10; ) {}
            }
            break;

          case --b + (b + 1 - .1 - .1 - .1):
        }
    } while ((c += 1) + [ {
        value: /[abc4]/g.exec((delete a || b || 5).toString()),
        "": ((b = a) || a || 3).toString(),
        "": a++ + /[abc4]/g.exec((a++ + ("c" ^ 0 & (c = (c = 1 + c) + 1 + 1, 0)) || b || 5).toString()),
        Infinity: "symbol" == typeof undefined,
        value: --b + {}.done
    }[a++ + {
        1.5: b,
        b: b
    }], a++ + ("function" == typeof f1 && 0 <= --_calls_ && f1()), "function" == typeof f1 && 0 <= --_calls_ && f1(..."" + undefined, ((c += 1) + /[abc4]/g.exec((c = 1 + c, 
    ((2 <= [] == 0) + !1 || b || 5).toString())) || 4).toString()["function" == typeof f0 && 0 <= --_calls_ && f0()]), b-- ].undefined && 0 < --brake2);
}();

for (key1 in expr1) {
    var c = 1 + c, bar = expr1[key1], await_2 = a++ + +function() {
        for (var brake13 = 5; --b, --b, 0 < --brake13; ) {
            c += 1, b = a;
        }
    }(), a_2 = /[abc4]/g.exec((key1 && key1.null || b || 5).toString());
}

if (b--) {
    switch (a && a.undefined) {
      case (c += 1) + (a *= --b + (a + ((c += 1) + -5))):
        for (var brake17 = 5; a++ - 5 && 0 < brake17; --brake17) {
            --b, [ "function" == typeof a && 0 <= --_calls_ && a(..."" + a, (c = 1 + c, 
            (0 ^ (a -= 0)) == (c += 1, 38..toString() <= "")), (c = 1 + c, (a && (a.undefined = !1)) | -0 << [] << NaN), (c = 1 + c, 
            !1 >>> (a && (a[c = 1 + c, ((2 === [ , 0 ].length ^ 3) == (c += 1, -4)) - 1 / 0] *= !1)) != 0), ..."" + a, (c = 1 + c, 
            !1 !== (a && (a.value ^= 3)) % 0), --b + a++) ].get && (a++, b--, c = c + 1 + 1, 
            (--b + (--b + !0 || 9).toString()[--b + ~a] || a || 3).toString(), --b, 
            c += 1, a && a.b, a++, (() => {
                try {
                    c = 1 + c;
                } catch (NaN) {
                    c = 1 + (c = 1 + c);
                }
            })());
        }
        var bar_2 = function(b_1) {
            return --b + [ b_1 && b_1[[ , (c = 1 + c, !0), ..."" + b_1 ]], --b, a++ + ("function" == typeof f2 && 0 <= --_calls_ && f2(this)) ];
        }(1);
        break;

      case bar_2 && "function" == typeof bar_2.done && 0 <= --_calls_ && bar_2.done(2, ..."" + bar_2, !0):
        break;

      case (c += 1) + [ bar_2 && "function" == typeof bar_2.length && 0 <= --_calls_ && (--b, 
        bar_2 && bar_2.value, bar_2.length)("c", b, 2 === [ , 0 ].length), (c += 1) + bar_2 ? b : 0, (c += 1) + ((2 & []) > (c += 1, 
        0)), "object" in [ (typeof -b || a || 3).toString(), [] in {
            async: a++ + ("object" != typeof undefined_1),
            var: b
        } ? (c += 1) + /[abc4]/.test(((a++ + ((c += 1) + --a || a || 3).toString() || 8).toString()[b += a] || b || 5).toString()) : (c += 1) + [][bar_2], --b + b, --b + (NaN in [ b--, (c += 1) + 1 / 0, bar_2 && bar_2[(c += 1) + (0 < (bar_2 && (bar_2[c = 1 + c, 
        !1 & (c += 1, "number")] += 0 << (2 === [ , 0 ].length))) > (1 != (NaN != (2 === [ , 0 ].length))))], --b + {
            NaN: a++ + (0 === (!1 === -2 / 38..toString())),
            a: bar_2 && bar_2[c = 1 + c, "number" / (2 === [ , 0 ].length | 2 === [ , 0 ].length) + (bar_2 -= {} % 4 != "undefined")],
            [{}.null]: --b + (NaN != (2 === [ , 0 ].length != "c") ^ (bar_2 && ({
                Infinity: bar_2[bar_2 && bar_2[c = 1 + c, (23..toString() || 2 === [ , 0 ].length) < 0 | !0]]
            } = {
                Infinity: 0
            }))),
            done: (c += 1) + a--,
            ..."function" == typeof f2 && 0 <= --_calls_ && f2()
        }.value, --b + (bar_2 && bar_2.then) ]) ], [].c ].value:
        for (var brake27 = 5; (a || 3).toString()[a++ + a] && 0 < --brake27; ) {
            for (var brake28 = 5; a++, c = 1 + (c += 1), bar_2 && (bar_2[a++] = (bar_2 && (bar_2.static >>= 0)) & (3 % 38..toString() ^ [] != this)), 
            c = 1 + (c = 1 + c), (bar_2 += !0) && (bar_2["function" == typeof bar_2 && 0 <= --_calls_ && bar_2()] *= 24..toString() != [] === ("object" & [])), 
            bar_2 && "function" == typeof bar_2.static && 0 <= --_calls_ && bar_2.static((c = 1 + c, 
            (2 <= 24..toString()) - !1 >>> NaN), 23..toString(), 2), c = 1 + c, 
            (0 ^ (4 < []) << /[a2][^e]+$/ + !0 || a || 3).toString(), NaN % (1 <= 24..toString() || 0) && 0 < --brake28; ) {}
        }
        if ({
            next: 4 in [ NaN, (c += 1) + (bar_2 <<= a++ + a--) ],
            in: bar_2 && "function" == typeof bar_2.c && 0 <= --_calls_ && bar_2.c(a++ + (({} < "foo") + NaN ^ 0))
        }[a++ + (b = a)]) {
            var bar_2 = --b + /[abc4]/g.exec((--b + (b += a) || b || 5).toString()), bar_1 = b += a;
        } else {
            for (var brake32 = 5; (c += 1) + [ --b + ("function" == typeof bar_2 && 0 <= --_calls_ && bar_2([ (c = 1 + c, 
            (bar_2 && (bar_2.done = -[] || 0)) << (bar_1 <<= 0)), (c = 1 + (c += 1), 
            c += 1, !1 & (bar_2 && (bar_2.static &= 1)) / !0), 0 < (delete NaN <= {}), (c = 1 + (c = 1 + c), 
            bar_2 && (bar_2.null <<= (bar_1 += ("number" << 24..toString()) - 1) !== [] << -5 < !1)) ].get)) ] && 0 < brake32; --brake32) {
                bar_2 = (--b, void (b ^= a));
            }
        }
        break;

      case {}:
        for (var brake37 = 5; (c += 1) + (bar_2 && "function" == typeof bar_2.set && 0 <= --_calls_ && (--b, 
        /[abc4]/.test((--b + (bar_1 && (bar_1.next += !1 + ((38..toString() <= 0) << 0)), 
        !0) || b || 5).toString()), bar_2.set)(0)) && 0 < --brake37; ) {
            var bar_2_2 = function(b) {
                bar_1 && (bar_1[(--b + [ "object-2" << (bar_2 += [] <= 22) && 1, void (c = 1 + (c = 1 + c)), (c = 1 + c, 
                (bar_1 = [] * {}) % (bar_2 += 2) & (bar_2 += 38..toString() + "fooundefined")), 0 * ("function" >> {} == -5), (c = 1 + (c = 1 + c), 
                (b && (b.NaN += !1 < (c += 1, "function"))) & "c" >>> 24..toString() % (2 === [ , 0 ].length)) ][c = 1 + c, 
                (!0 - ("b" !== (2 === [ , 0 ].length))) * (bar_2 && (bar_2[--b + {
                    Infinity: (c = 1 + c, (!0 - (bar_2 && (bar_2[c = 1 + c, (-5 != 24..toString() ^ !0) < !0] += 5))) / (-5 <= {} <= (bar_1 += 0))),
                    async: !1,
                    a: 0
                }[c = 1 + (c = 1 + (c = 1 + c)), NaN >>> !0 % ("undefined" | 24..toString())]] += "object" < ({} < "a")))] || a || 3).toString()] = (c += 1, 
                1));
                (function(b_2) {
                    switch (c = 1 + c, c += 1, b = (this < (b_2 && (b_2[c = 1 + c, 
                    (this > 23..toString() >= (0 < 24..toString())) >> !1] = 5 >> this))) >> (0 < (void 0 === 24..toString()))) {
                      case c = 1 + c, bar_1 += 1 != (c += 1, 1):
                      case c = 1 + c, (0 != this) + ({} >>> !1) & (c += 1, 25):
                        break;

                      case c = 1 + c, -("a" - {}) / !0:
                      case c = 1 + c, 20 == (24..toString() == 23..toString()):
                    }
                    for (var brake42 = 5; c = 1 + c, ({} - 2) * ((4 & 38..toString()) > {}) && 0 < --brake42; ) {
                        c = 1 + c, 24..toString(), 24..toString(), b = 22 >>> 38..toString();
                    }
                })((38..toString(), 23..toString(), a++ + ++a), 38..toString());
            }("a", 23..toString());
        }
    }
} else {
    var a_1 = function(let_1, bar_2) {
        var bar_2_2 = a++ + [ ..."" + bar_2 ].a;
        if (a++ + /[abc4]/g.exec((void 0 in {
            ...bar_2_2,
            get: "function" == typeof f2 && 0 <= --_calls_ && f2(--b + --b, "b"),
            "-2": --b + ("bar" in [ (bar_2_2 && (bar_2_2[c = 1 + c, (bar_2 && (bar_2[c = 1 + c, 
            (null != []) % (0 <= (2 === [ , 0 ].length)) + (bar_2 && ({
                foo: bar_2[b = a]
            } = {
                foo: (bar_2_2 && ({
                    value: bar_2_2.get
                } = {
                    value: !1
                })) % !1
            }))] |= 0)) >> (0 ^ 38..toString()) ^ ("object" ^ 23..toString()) >>> (let_1 && (let_1.next += !1))] ^= 5 != this)) + NaN | !1, , --b + /[abc4]/.test((c = 1 + c, 
            (-5 ^ (bar_2 && (bar_2[c = 1 + c, c += 1, !1 ^ ([] * [] | (bar_2 && ([ bar_2.then ] = [ !1 ])))] = -4)) || b || 5).toString())), --b + (c = 1 + c, 
            (!1 < (/[a2][^e]+$/ ^ 2 === [ , 0 ].length || this && -0) || a || 3).toString()), (c += 1) + {
                get: (c = 1 + c, 0 << ({} << null || "" != 38..toString())),
                static: (c = 1 + c, 0 === (2 === [ , 0 ].length) < "" || "b" === {} | "0a"),
                3: 0 <= (0 != ("" ^ this)),
                undefined: (c = 1 + (c = 1 + c), (0 == (1 ^ 38..toString())) >= (-4 == 38..toString() < "function"))
            }[c = 1 + c, NaN + (38..toString() + "number" && 25)] ]),
            [{
                Infinity: 22
            }[b]]: --b + void 0,
            undefined: a++ + b
        } || b || 5).toString())) {
            var key47, expr47 = --b + (c = c + 1 + 1, "number");
            for (key47 in expr47) {
                c = 1 + c;
                for (var brake48 = 5; bar_2 && 0 < --brake48; ) {
                    (function() {
                        for (var brake51 = 5; c = 1 + c, (!1 <= "" >> []) >> (bar_2 && (bar_2.next = void 0 / {} & ("bar" | 24..toString()))) && 0 < --brake51; ) {
                            c = 1 + c, c += 1, bar_1 = -0 | "function" != this;
                        }
                    })((a++, c = 1 + c, (let_1 && (let_1[5 <= -3 >= (0 == (c = (c = 1 + c) + 1 + 1, 
                    0))] ^= -23)) - (bar_2_2 |= 0) < !1 ? c = 1 + c : c = 1 + c));
                }
            }
        }
    }((bar_2 && (bar_2.foo += (bar_2 && (bar_2[a++ + b--] = !0)) / (c += 1, 0)), 
    !0), 2, a++);
}

console.log(null, a, b, c, 1 / 0, NaN, void 0);
original result:
null 12744 8 7 Infinity NaN undefined

uglified result:
null 14950 8 12 Infinity NaN undefined
// reduced test case (output will differ)

// (beautified)
var a;

L10368: do {
    switch (0) {
      case 0:
        var brake4 = 0;
        while (--brake4) {
            continue L10368;
        }
        break;

      case 0:
        a++;
    }
} while (0);

console.log(a);
// output: undefined
// 
// minify: NaN
// 
// options: {
//   "mangle": false,
//   "output": {
//     "v8": true
//   },
//   "validate": true
// }
minify(options):
{
  "mangle": false,
  "output": {
    "v8": true
  }
}

Suspicious compress options:
  dead_code
  if_return
  loops
@alexlamsl alexlamsl added the bug label Jul 29, 2022
alexlamsl added a commit to alexlamsl/UglifyJS that referenced this issue Jul 29, 2022
alexlamsl added a commit to alexlamsl/UglifyJS that referenced this issue Jul 30, 2022
alexlamsl added a commit to alexlamsl/UglifyJS that referenced this issue Jul 30, 2022
alexlamsl added a commit to alexlamsl/UglifyJS that referenced this issue Jul 30, 2022
alexlamsl added a commit to alexlamsl/UglifyJS that referenced this issue Jul 30, 2022
alexlamsl added a commit to alexlamsl/UglifyJS that referenced this issue Jul 30, 2022
alexlamsl added a commit that referenced this issue Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant