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 #5249

Closed
alexlamsl opened this issue Jan 2, 2022 · 0 comments · Fixed by #5252
Closed

ufuzz failure #5249

alexlamsl opened this issue Jan 2, 2022 · 0 comments · Fixed by #5252
Labels

Comments

@alexlamsl
Copy link
Collaborator

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

function f0(undefined, yield) {
    switch (a++ + {
        done: (/[abc4]/g.exec((--b || b || 5).toString()) || 5).toString()[a++ + (typeof undefined == "function" && --_calls_ >= 0 && undefined(-1))]
    }) {
      case {
            a: --b + -a,
            [--b + (typeof f2 == "function" && --_calls_ >= 0 && f2(-0 in [ (c = c + 1) + (1 === 1 ? a : b), a++ + (typeof f0 == "function" && --_calls_ >= 0 && f0(25)), (c = c + 1) + "object", a++ + b++, (a++ + yield || 5).toString()[a++ + []] ]))]: undefined,
            in: yield && yield[--a],
            0: typeof yield == "function" && --_calls_ >= 0 && yield(true, --b, ..."" + undefined)
        }.get:
        var a_1;
        {
            var expr3 = --b + (a_1 && a_1.then);
            for (var key3 in expr3) {
                if (b + 1 - .1 - .1 - .1) {
                    if (key3 && typeof key3.length == "function" && --_calls_ >= 0 && key3.length("bar")) {
                        --b + (b + 1 - .1 - .1 - .1);
                    } else {
                        L10914: {}
                    }
                } else if (/[a2][^e]+$/  in [ (-1 < [] !== (yield *= [] ^ -0)) % ((true - "number") * (-0 != "function")), -3 in [], a_1 && typeof a_1.b == "function" && --_calls_ >= 0 && a_1.b(false, ...[ (c = 1 + c, 
                (null >> "bar" < (3 ^ "b")) << (a_1 = null % "function" ^ "bar" * false)), (c = 1 + c, 
                key3 && ([ key3[a++ + /[abc4]/g.exec(((c = 1 + c, delete (a_1 && (a_1[{
                    b: (c = 1 + c, (yield && (yield[--b + void b] >>>= true * -1 ^ "bar" !== -2)) * !(c = c + 1, 
                    "object")),
                    *foo(undefined_1, yield_2, b_2) {
                    }
                }.var] += -0 >= [ , 0 ][1] >= "function" + 3))) || b || 5).toString())] ] = [ -1 > "number" != (-5 & true) ]) && ("b" + "undefined") % (NaN | -4)), (c = 1 + c, 
                (25 % -1 & false === this) << (5 >>> "number" << Infinity % Infinity)), (c = 1 + c, 
                (key3 = "object" / "" >>> (undefined && (undefined.then = (null, "b")))) + (c = c + 1, 
                -4, NaN ^ "bar")) ]), ..."" + key3 ]) {
                    var brake9 = 5;
                    while ((c = c + 1) + (c = c + 1, +("object" !== 24..toString())) && --brake9 > 0) {
                        switch ((c = c + 1) + {}) {
                          case ++a:
                            switch (c = 1 + c, c = c + 1, -2 - 24..toString() - +false) {
                              default:
                                ;

                              case c = 1 + c, (true === /[a2][^e]+$/) / (key3 && (key3[c = 1 + c, (25 >= "c" && (true, 
                                "undefined")) < (25 === "object", 1 === {})] = 3 + -1)) << ("" >>> 3 == (24..toString() === 0)):
                                ;
                                break;

                              case c = 1 + c, ((true == 23..toString()) <= "foo" >>> 23..toString()) >>> (-3 == null) * (22 === "bar"):
                                ;
                                break;

                              case c = 1 + c, 25 % "number" != 5 >= this != (4 - 1 && -0 !== 0):
                                ;
                                break;
                            }
                            {
                            }
                            break;

                          case /[abc4]/g.exec((--b + a-- || b || 5).toString()):
                            c = c + 1;
                            {
                            }
                            break;

                          case --b + (typeof f0 == "function" && --_calls_ >= 0 && f0()):
                            for (var brake15 = 5; (c = 1 + c, (-2 != this | -1 / 2) <= +~this) && brake15 > 0; --brake15) {
                                c = 1 + c, -2 - "c" + (Infinity !== "number") - ("b" >>> 1 << (key3 && (key3.a &= "undefined" >= -4)));
                            }
                            {
                                var expr17 = [ (c = 1 + c, (23..toString() & -5) > (-4 & "foo"), "b" != 1 || (1, 
                                undefined)) ];
                                for (let key17 of expr17) {
                                    c = 1 + c;
                                    var yield = expr17[key17];
                                    c = 1 + c, +({} != "undefined" & -4 >= -5);
                                }
                            }
                            break;

                          case (c = c + 1) + (b += a):
                            break;
                        }
                    }
                } else {
                    try {
                        {
                            var expr20 = a++ + (a++ + [] ? (c = c + 1) + ((c = 1 + c, ("object" === false) << ("undefined" != []) != -3 > null > ("c" != 38..toString())) || 6).toString()[c = 1 + c, 
                            (1 / "" !== ("c" | null)) * (-2 >> -0 >>> (-5 >= "foo"))] : a_1 && a_1.NaN);
                            for (var key20 in expr20) {
                                c = 1 + c;
                                var yield_1 = expr20[key20];
                                {
                                    var brake21 = 5;
                                    while ((c = c + 1) + [ (c = 1 + c, (key3 && (key3.in = (null < []) >>> ("b" <= [ , 0 ][1]))) == (24..toString() > Infinity) >>> +"undefined"), (c = 1 + c, 
                                    "bar" === 24..toString() == (-0 | 23..toString()), yield_1 && ([ yield_1[a++ + (b = a)] ] = [ (25 && -1) << (yield_1 && ([ yield_1.in ] = [ 4 | "undefined" ])) ])) ][c = 1 + c, 
                                    c = c + 1, undefined * NaN || yield_1 && (yield_1.var = "c" ^ 38..toString())] && --brake21 > 0) {
                                        var expr22 = (c = 1 + c, ("c" === [ , 0 ][1]) / ("a" == {}) | (-0 >> 5) % ("bar" | "object"));
                                        for (var key22 in expr22) {
                                            c = 1 + c, "" == false === (5, "foo") && (yield -= null === -4) % (([ , 0 ].length === 2) > -3);
                                        }
                                    }
                                }
                            }
                        }
                    } catch (a_1_1) {
                        if ({
                            length: (c = 1 + c, a_1_1 && (a_1_1.value = (a_1 = (23..toString() == -3) << "number" - "bar") && (a_1 && ({
                                0: a_1[a_1 && typeof a_1.then == "function" && --_calls_ >= 0 && a_1.then("function", (c = 1 + c, 
                                undefined && ([ undefined.a ] = [ (a_1 += [] !== -3) * (-1 <= []) >>> (3 | true || -3 + "") ])), -1)]
                            } = {
                                0: (a_1_1 && (a_1_1[c = 1 + c, ("c" + "bar" || 1 < "number") >= (c = c + 1, 2, {} <= 25)] = "function" && "number")) ^ "a" === "a"
                            })))),
                            foo: (c = 1 + c, (-1 !== "b" && (undefined |= NaN & -4)) / ((yield && (yield.b |= 2 >= -5)) == ("a" | 4))),
                            foo: (c = 1 + c, -5 + "number" === "undefined" + -3, (c = c + 1, {}) / (22 === 4))
                        }[c = 1 + c, (yield = (38..toString() && -1) > (-3 | "object")) & (("foo", 5) && 3 * 4)]) {
                            return c = 1 + c, ((-1 <= 2) - ([ , 0 ][1] === "b")) / ((key3 && (key3[c = 1 + c, 
                            (- -1 >>> (yield = undefined >= "b")) - ("undefined" + -0 != (true === "function"))] = 22 && "c")) != (1 == "undefined"));
                        } else {}
                        if ((c = c + 1) + (null in {
                            c: (c = 1 + c, 25 % ([ , 0 ].length === 2) == 2 << /[a2][^e]+$/ | (-3 == 2) * (2 < 22)),
                            "\t": (c = 1 + c, "number" / "" >= (-0 > false) && (c = c + 1, "a" ^ "b")),
                            then: (c = 1 + c, (c = c + 1, /[a2][^e]+$/ != -5) << (-2 + 38..toString() >= ([ , 0 ].length === 2 === "function"))),
                            then: (c = 1 + c, (23..toString() - {}, "bar" || null) >= (3 | 5 | ("c" && 1)))
                        })) {
                            if (c = 1 + c, (a_1_1 *= 25 == ([ , 0 ].length === 2)) > ([ , 0 ][1] !== -2) | 38..toString() != 2 != "foo" - -5) {
                                c = 1 + c, 5 <= -3 ^ (false && []) ^ (c = c + 1, 25) === 0 % -3;
                            } else {
                                c = 1 + c, (2 ^ "undefined" || -1 - -2) >> ((c = c + 1, this) ^ ("undefined" | -4));
                            }
                        }
                    } finally {
                        {
                            var brake31 = 5;
                            L10915: while ((c = c + 1) + +((3 / 4 & 1 + []) * ([ , 0 ].length === 2 ^ [ , 0 ].length === 2 ^ "number" < 22)) && --brake31 > 0) {
                                if (c = 1 + c, (key3 %= 5 + -5) - (undefined << import.meta) >> ([ , 0 ][1] <= "foo" ^ NaN + "foo")) {
                                    c = 1 + c, (false ^ "undefined") >> +24..toString() << ((-5 ^ -0) === ("number" !== 5));
                                } else {
                                    c = 1 + c, ((c = c + 1, 22) <= (NaN < "a")) % (Infinity ^ "foo" ^ 22 < "");
                                }
                            }
                        }
                        {
                            var brake35 = 5;
                            L10916: do {
                                for (var brake36 = 5; (c = 1 + c, ("b" && 5) > (25 ^ undefined) !== ((3 && -3) === (/[a2][^e]+$/ == -0))) && brake36 > 0; --brake36) {
                                    c = 1 + c, ("a" * {} < (38..toString() > 24..toString())) >>> (key3 += 23..toString() % "function", 
                                    "undefined" >>> ([ , 0 ].length === 2));
                                }
                            } while (!(c = c + 1, undefined = ("c" & -5) == (key3 && (key3.then >>>= [] % -2))) && --brake35 > 0);
                        }
                    }
                }
            }
        }
        break;

      case --b + (1 === 1 ? a : b):
        break;

      case b--:
        "foo";

      default:
        {
            if (a++ + {
                1.5: (c = c + 1) + [ (c = 1 + c, ("" ^ true ^ (yield && ([ yield.static ] = [ 23..toString() >>> "a" ]))) >>> (("foo" <= "function") >> -0 % 38..toString())), (c = 1 + c, 
                (yield && ({
                    foo: yield.then
                } = {
                    foo: "" * []
                })) < "object" + -5 ^ (4, null) * (undefined >>>= "foo" >>> 22)), (c = 1 + c, ("object" != 25 || yield && (yield[c = 1 + c, 
                (a_1 = [ , 0 ][1] + [ , 0 ][1] + (0 + -2)) == (-2 % 0 ^ (1 | undefined))] += NaN < "b")) !== ({} / "" | "undefined" >>> false)), (c = 1 + c, 
                ("b" < "") >>> (-0 << 3) | 24..toString() + "bar" === (4 !== -1)), (c = 1 + c, (yield = 24..toString() <= /[a2][^e]+$/ > 1 + Infinity) ^ (23..toString() > /[a2][^e]+$/) * (-3 <= ([ , 0 ].length === 2))) ],
                null: a++ + (/[abc4]/.test(((c = 1 + c, (undefined && (undefined[+a] = -2 <= "number" ^ null == -5)) >>> ("c" - [] << (a_1 && (a_1[c = 1 + c, 
                ((0 !== "b") < NaN * NaN) * (c = c + 1, 38..toString() == [ , 0 ][1])] = 4 === "bar")))) || b || 5).toString()) || 8).toString()[--b + (b *= a)],
                [(c = c + 1) + (a_1 && a_1.undefined)]: void b
            }.async) {
                var b_1 = function f1() {
                    {
                    }
                    {
                        var brake43 = 5;
                        while ((c = 1 + c, (~"foo" || undefined >>> Infinity) != (-2 < undefined && 38..toString() !== 38..toString())) && --brake43 > 0) {
                            c = 1 + c, (NaN === -3 && "undefined" >>> 2) !== ("" != Infinity) * (5 >> -2);
                        }
                    }
                }(4, "undefined");
            }
        }
        {
            return;
            a++ + 4;
        }
    }
    switch ((c = c + 1) + (b <<= a)) {
      default:
      case typeof a_1_1 !== "function":
        var a_2 = --b + void function yield() {}(), undefined = (3 / [] | "foo" >> 5) == (null << 24..toString() != (-3 || 2));
        c = c + 1;
        break;

      case typeof undefined == "function" && --_calls_ >= 0 && undefined(true):
        {
            var foo = function f2(yield_1, a_2, Infinity_1) {
                {
                    var brake50 = 5;
                    do {
                        var yield_1 = [ (c = 1 + c, a_2 && (a_2.next = {} >>> -4 >> ("a" ^ "object")) && (25 | "object") % (yield_1 && (yield_1.foo = -5 == /[a2][^e]+$/))), (c = 1 + c, 
                        "c" << ([ , 0 ].length === 2) > "number" / ([ , 0 ].length === 2) !== ((undefined && (undefined.value >>>= this != 24..toString())) !== "function" >>> 24..toString())), ...[ (c = 1 + c, 
                        (-3 || "undefined") < ("number" <= -4) | ([ , 0 ][1] >>> -3 | 22 << 22)), (c = 1 + c, 
                        ((a_2 += 24..toString() ^ [ , 0 ][1]) | "foo" <= "a") / (yield_1 = (3 || 23..toString()) * (null / 0))), (c = 1 + c, 
                        (-2 | 1) != -5 / 22 !== (c = c + 1, "function") >>> ("b" << "c")), (c = 1 + c, (c = c + 1, 
                        null) - (25 | "bar") ^ delete ([] % -5)) ] ][typeof bar];
                    } while (typeof ((c = c + 1) + 23..toString()) && --brake50 > 0);
                }
                --b + (typeof Infinity_1 == "function" && --_calls_ >= 0 && Infinity_1());
            }();
        }
        {
            var brake53 = 5;
            while (yield && --brake53 > 0) {
                c = c + 1;
            }
        }
        break;

      case yield && typeof yield.async == "function" && --_calls_ >= 0 && yield.async`${(c = c + 1) + /[abc4]/g.exec((a++ || b || 5).toString())}${--b + (foo && typeof foo.NaN == "function" && --_calls_ >= 0 && ((c = c + 1) + (foo = (c = c + 1) + ("" in {
            null: a++ + /[abc4]/.test(((c = 1 + c, (25 === [ , 0 ][1]) << ("bar" <= ""), yield && (yield[(c = c + 1) + /[abc4]/.test(((c = 1 + c, 
            (undefined && (undefined[--b + (yield && yield[c = 1 + c, [] <= {} ^ (yield && (yield[c = 1 + c, 
            c = c + 1, undefined && (undefined[(c = c + 1) + 25] ^= "bar" >> "bar" || "a" % [ , 0 ][1])] *= "undefined" == 22)) || (~true, 
            "undefined" !== "a")])] = (4 ^ "") << (25 >= "bar"))) ^ (([ , 0 ].length === 2) <= -5) >> (5 || -2)) || b || 5).toString())] += ([ , 0 ][1] >> 25) - (4 - 3))) || b || 5).toString()),
            "-2": ++a,
            var: [ (c = 1 + c, "number" / "object" << (a_1 <<= null || "function") === -(undefined ^ -5)), (c = 1 + c, 
            foo && (foo[typeof f1 == "function" && --_calls_ >= 0 && f1((c = 1 + c, null >> "b" >>> -5 / null << (5 >>> 22 >> (null > "function"))), (c = 1 + c, 
            "object" - "undefined" & (c = c + 1, "function") & ("foo" == [ , 0 ][1] & (1 | 38..toString()))), this)] %= (a_2 && (a_2.Infinity = undefined && -1)) + (foo && (foo[c = 1 + c, 
            a_1 && (a_1[--b + (typeof f3 == "function" && --_calls_ >= 0 && f3((c = 1 + c, void "undefined" * ("undefined" + false) <= (undefined += "function" >>> 22 >> (Infinity == "undefined"))), {}, ..."" + foo))] = (a_2 *= Infinity + "c") % (4 / "object") !== ("a" | 4) + (a_2 >>>= true == "a"))] = "object" * 3)) + (25 | undefined || -0 && ""))) ].then,
            0: (c = c + 1) + (-2 in [ (c = 1 + c, (NaN === 38..toString() ^ "" & "function") !== (a_2 += true || 5) % ("object" || "b")), (c = 1 + c, 
            ((this && {}) & ({} && -3)) == ("bar" + false | "object" <= 4)), (c = 1 + c, ([] << "c", 
            38..toString() !== []) != ("foo" === false) << ({} < "number")), ..."" + a_2 ])
        })), foo.NaN)((c = c + 1) + (b += a)))}`:
        break;
    }
}

var b_2 = f0();

console.log(null, a, b, c, Infinity, NaN, undefined);
// uglified code
// (beautified)
var _calls_ = 10, a = 100, b = 10, c = 0;

function f0(e, t) {
    switch (a++ + {
        done: (/[abc4]/g.exec((--b || b || 5).toString()) || 5).toString()[a++ + ("function" == typeof e && 0 <= --_calls_ && e(-1))]
    }) {
      case {
            a: --b - a,
            [--b + ("function" == typeof f2 && 0 <= --_calls_ && f2(-0 in [ (c += 1) + a, a++ + ("function" == typeof f0 && 0 <= --_calls_ && f0(25)), (c += 1) + "object", a++ + b++, ("" + (a++ + t || 5))[a++ + []] ]))]: e,
            in: t && t[--a],
            0: "function" == typeof t && 0 <= --_calls_ && t(!0, --b, ..."" + e)
        }.get:
        var n, o;
        for (o in --b + (n && n.then)) {
            if (b + 1 - .3) {
                o && "function" == typeof o.length && 0 <= --_calls_ && o.length("bar") && --b;
            } else if (/[a2][^e]+$/  in [ (!0 !== (t *= 0)) % NaN, -3 in [], n && "function" == typeof n.b && 0 <= --_calls_ && n.b(!1, !0 << (n = 0), (c = 1 + (1 + c), 
            o && ([ o[a++ + /[abc4]/g.exec((c = 1 + c, n && (n[{
                b: (c = 1 + c, (t && (t[--b + void 0] >>>= -2)) * (c += 1, !1)),
                *foo(c, a, t) {}
            }.var] += !1), "" + !0))] ] = [ !0 ]) && NaN), (0 & !1 === this) << 5, (c = 1 + (1 + c), 
            (o = NaN >>> (e && (e.then = "b"))) + (c += 1, 0))), ..."" + o ]) {
                for (var f = 5; (c += 1) + (c += 1, 1) && 0 < --f; ) {
                    switch ((c += 1) + {}) {
                      case ++a:
                        switch (-26) {
                          default:
                          case c = 1 + (1 + c + 1), !1 / (o && (o[c = 1 + c, !1] = 2)) << !0:
                          case c = 1 + (1 + c), NaN != this <= 5 != 0:
                        }
                        break;

                      case /[abc4]/g.exec((--b + a-- || b || 5).toString()):
                        c += 1;
                        break;

                      case --b + ("function" == typeof f0 && 0 <= --_calls_ && f0()):
                        for (var i = 5; c = 1 + c, (-2 != this | -.5) <= +~this && 0 < i; --i) {
                            c = 1 + c, o && (o.a &= !1);
                        }
                        var l, r = [ (c = 1 + c, !0) ];
                        for (l of r) {
                            c = 1 + c, t = r[l], c = 1 + c;
                        }
                        break;

                      case (c += 1) + (b += a):
                    }
                }
            } else {
                try {
                    var s, N = a++ + (a++ + [] ? (c += 1) + "6"[c = 1 + (c = 1 + c), 4294967294] : n && n.NaN);
                    for (s in N) {
                        c = 1 + c;
                        for (var h = N[s], u = 5; (c += 1) + [ (c = 1 + c, 0 == (o && (o.in = 0))), (c = 1 + c, 
                        h && ([ h[a++ + (b = a)] ] = [ -1 << (h && ([ h.in ] = [ 4 ])) ])) ][c = 1 + c, 
                        c += 1, NaN * e || h && (h.var = 38)] && 0 < --u; ) {
                            for (var _ in c = 1 + c, 0) {
                                c = 1 + c;
                            }
                        }
                    }
                } catch (a) {
                    if ({
                        length: (c = 1 + c, a && (a.value = n = 0)),
                        foo: (c = 1 + c, (e |= 0) / (4 == (t && (t.b |= !0)))),
                        foo: (c = 1 + c, NaN)
                    }[c = 1 + (c += 1), 12 & (t = !0)]) {
                        return c = 1 + c, 1 / (0 != (o && (o[c = 1 + c, (1 >>> (t = "b" <= e)) - !0] = "c")));
                    }
                    (c += 1) + (null in {
                        c: (c = 1 + c, 25 % (2 === [ , 0 ].length) == 2 | 0),
                        "\t": !1,
                        then: (c = 1 + (c = 1 + c), c += 1, !0 << ((2 === [ , 0 ].length === "function") <= "-238")),
                        then: (c = 1 + c, !1)
                    }) && (c = 1 + c, a *= 25 == (2 === [ , 0 ].length), c = 1 + c, c += 1);
                } finally {
                    for (var g = 5; (c += 1) + 0 * (2 === [ , 0 ].length ^ 2 === [ , 0 ].length ^ !1) && 0 < --g; ) {
                        c = 1 + c, (o %= 0) - (e << import.meta) >> 0 ? c = 1 + c : (c = 1 + c, c += 1);
                    }
                    var v = 5;
                    do {
                        for (var y = 5; c = 1 + c, (25 ^ e) < 5 != 0 && 0 < y; --y) {
                            c = 1 + c, o += NaN;
                        }
                    } while (c += 1, !(e = 0 == (o && (o.then >>>= 0))) && 0 < --v);
                }
            }
        }
        break;

      case --b + a:
        break;

      default:
        if (b--, a++ + {
            1.5: (c += 1) + [ (c = 1 + c, (1 ^ (t && ([ t.static ] = [ 23 ]))) >>> 1), (c = 1 + c, 
            (t && ({
                foo: t.then
            } = {
                foo: 0
            })) < "object-5" ^ null * (e >>>= 0)), !0, 0, (c = 1 + (1 + (1 + c)), (t = !1) ^ !0 * (-3 <= (2 === [ , 0 ].length))) ],
            null: a++ + (/[abc4]/.test((c = 1 + c, ((e && (e[+a] = 0)) >>> (NaN << (n && (n[c = 1 + c, 
            !1 * (c += 1, !1)] = !1))) || b || 5).toString())) || 8).toString()[--b + (b *= a)],
            [(c += 1) + (n && n.undefined)]: void 0
        }.async) {
            for (var p = 5; c = 1 + c, -1 != (-2 < e && !1) && 0 < --p; ) {
                c = 1 + c;
            }
            return;
        }
    }
    switch ((c += 1) + (b <<= a)) {
      default:
      case "function" != typeof a_1_1:
        var d = --b + void 0, e = !1;
        c += 1;
        break;

      case "function" == typeof e && 0 <= --_calls_ && e(!0):
        for (var S = function(a, t) {
            for (var n = 5; a = [ (c = 1 + c, t && (t.next = 0) && 25 % (a && (a.foo = !1))), (c = 1 + c, 
            "number" / (2 === [ , 0 ].length) < "c" << (2 === [ , 0 ].length) != (0 !== (e && (e.value >>>= "24" != this)))), 92274689, (!1 | (t += 24)) / (a = NaN), !0, (c = 1 + (1 + (1 + (1 + c)) + 1), 
            !0 ^ (c += 1, -25)) ][typeof bar], c += 1, 0 < --n; ) {}
            --b;
        }(), k = 5; t && 0 < --k; ) {
            c += 1;
        }
        break;

      case t && "function" == typeof t.async && 0 <= --_calls_ && t.async`${(c += 1) + /[abc4]/g.exec((a++ || b || 5).toString())}${--b + (S && "function" == typeof S.NaN && 0 <= --_calls_ && (c += 1, 
        S = (c += 1) + ("" in {
            null: a++ + /[abc4]/.test((c = 1 + c, (t && (t[(c += 1) + /[abc4]/.test((c = 1 + c, 
            ((e && (e[--b + (t && t[c = 1 + c, !0 ^ (t && (t[c = 1 + c, c += 1, e && (e[(c += 1) + 25] ^= NaN)] *= !1)) || !0])] = 4)) ^ ((2 === [ , 0 ].length) <= -5) >> 5 || b || 5).toString()))] += -1) || b || 5).toString())),
            "-2": ++a,
            var: [ (c = 1 + c, NaN << (n <<= "function") == -(-5 ^ e)), (c = 1 + c, S && (S["function" == typeof f1 && 0 <= --_calls_ && f1((c = 1 + c, 
            0), (c = 1 + c, 0 & (c += 1, "function")), this)] %= (d && (d.Infinity = e && -1)) + (S && (S[c = 1 + c, 
            n && (n[--b + ("function" == typeof f3 && 0 <= --_calls_ && f3((c = 1 + c, NaN <= (e += 0)), {}, ..."" + S))] = (d *= 1 / 0 + "c") % NaN != 4 + (d >>>= !1))] = NaN)) + (25 | e || -0))) ].then,
            0: (c += 1) + (-2 in [ (c = 1 + c, 0 != (d += !0) % "object"), (c = 1 + c, 0 == (-3 & (this && {}))), (c = 1 + c, 
            !0), ..."" + d ])
        }), S.NaN)((c += 1) + (b += a)))}`:
    }
}

var b_2 = f0();

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

uglified result:
null 104 106495 10 Infinity NaN undefined
// reduced test case (output will differ)

// (beautified)
var b = 0;

function f0() {
    switch (0) {
      case b:
        var yield = 0;

      case b--:
      default:
        if (yield) {
            var b_1 = function f1() {
                while (1) {}
            }();
        }
        return;
    }
    0();
}

f0();
// output: 
// minify: TypeError: 0 is not a function
// options: {
//   "compress": {
//     "passes": 1000000,
//     "sequences": 1000000,
//     "unsafe": true,
//     "unsafe_Function": true,
//     "unsafe_math": true,
//     "unsafe_proto": true,
//     "unsafe_regexp": true
//   },
//   "mangle": {
//     "v8": true
//   },
//   "output": {
//     "v8": true
//   },
//   "validate": true
// }
minify(options):
{
  "compress": {
    "passes": 1000000,
    "sequences": 1000000,
    "unsafe": true,
    "unsafe_Function": true,
    "unsafe_math": true,
    "unsafe_proto": true,
    "unsafe_regexp": true
  },
  "mangle": {
    "v8": true
  },
  "output": {
    "v8": true
  }
}

Suspicious compress options:
  conditionals
  dead_code
  inline
  passes
  sequences
  side_effects
  unused
@alexlamsl alexlamsl added the bug label Jan 2, 2022
alexlamsl added a commit to alexlamsl/UglifyJS that referenced this issue Jan 2, 2022
alexlamsl added a commit to alexlamsl/UglifyJS that referenced this issue Jan 2, 2022
alexlamsl added a commit that referenced this issue Jan 2, 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