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

Closed
alexlamsl opened this issue Jul 20, 2021 · 0 comments · Fixed by #5090
Closed

ufuzz failure #5089

alexlamsl opened this issue Jul 20, 2021 · 0 comments · Fixed by #5090
Labels

Comments

@alexlamsl
Copy link
Collaborator

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

function f0(foo_1, c_2, foo_2) {
    switch (--b + b--) {
      default:
        L25575: for (var brake2 = 5; "bar" in [ a++ + (Infinity in [ typeof (a++ + /[abc4]/g.exec(((c = 1 + c, 
        {} & null & ("b" ^ 23..toString()) ^ [] * "function" >> (c_2 >>>= false !== "foo")) || b || 5).toString())), --b + /[abc4]/.test((void b || b || 5).toString()) ]), typeof c_2 == "function" && --_calls_ >= 0 && c_2(-(((38..toString() != true) <= -5 + "foo") >>> ({} << 3) / ("bar" || this))), --b + (typeof c_2 == "function" && --_calls_ >= 0 && c_2(--b + --b, (c = c + 1) + ((c = c + 1) + !function() {
        }() || a || 3).toString(), this)), b++ ] && brake2 > 0; --brake2) {
            c = c + 1;
        }

      case 23..toString() <= Infinity ^ (c = c + 1, [ , 0 ].length === 2) ^ (c = c + 1, 
        c = c + 1, 2):
        switch (a++ + ((/[a2][^e]+$/ >= "object") * (true | {}) <= ((NaN && "bar") == "object" <= "undefined"))) {
          case ((c = c + 1) + (1 === 1 ? a : b) || a || 3).toString():
            {
                var expr5 = a++ + (true in {});
                for (var foo_2 in expr5) {
                    Infinity in {
                        var: (c = c + 1) + [ (c = 1 + c, (true / undefined ^ (-2 | 0)) * (/[a2][^e]+$/ % -0 || -4 * 24..toString())), (c = 1 + c, 
                        (-1 <= 24..toString()) * (this == "function") << ((-2 || -5) >= (this > false))), (c = 1 + c, 
                        (true >> "bar", 5 * /[a2][^e]+$/) & -5 - 5 > (([ , 0 ].length === 2) >= [ , 0 ][1])), (c = 1 + c, 
                        ~+1 / (c_2 >>= (c_2 && (c_2[c = 1 + c, foo_2 += false << false == null % "foo" != !(([ , 0 ].length === 2) % 38..toString())] = -4 === 4)) + "a" % "bar")) ].null,
                        async: ((c = 1 + c, (5 / 25 === "b" >> "a") >> (38..toString() + "bar" != (2 == "b"))) || a || 3).toString(),
                        ...foo_2,
                        3: --b + +function() {
                        }()
                    };
                }
            }
            if (foo_1 && typeof foo_1.in == "function" && --_calls_ >= 0 && foo_1.in(2, {}, -0)) {
                if ((c = c + 1) + (3 in [ (c = c + 1) + ++a, (() => {
                })(), a++ + c_2, (c = c + 1) + --b, {}.value ])) {
                    return (c = c + 1) + (c_2 && c_2[a++ + ((c = 1 + c, (true <= "function") >> (true || 25) > (foo_2 && (foo_2.done = 4 <= "a")) / (-5 - -0)) ? (c = 1 + c, 
                    ((-1 ^ 1) & (c_2 && (c_2[c = 1 + c, (4 == null) >= ("a" && 25) && [] ^ -5 ^ this <= ([ , 0 ].length === 2)] *= [ , 0 ][1] + true))) >> ((foo_2 && ({
                        NaN: foo_2[c = 1 + c, NaN / "number" % (-4 + [ , 0 ][1]) !== (-4 < 22 != 24..toString() << 1)]
                    } = {
                        NaN: "number" == Infinity
                    })) | 22 <= "undefined")) : (c = 1 + c, (c_2 && (c_2.next = 23..toString() > 38..toString())) >= (c = c + 1, 
                    38..toString()) & (foo_2 && (foo_2[--b + {
                        then: (c = 1 + c, c_2 && ({
                            set: c_2[-2]
                        } = {
                            set: -2 >>> true != false / "bar" && (foo_2 %= 5 >= "") < ("b" && [ , 0 ][1])
                        })),
                        then: (c = 1 + c, -2 % 0 / (true ^ true) << ((c_2 = 24..toString() & false) & (0 || NaN))),
                        async: (c = 1 + c, (-0 == -1 ^ 38..toString() << -2) <= ((1 | false) > (4 === /[a2][^e]+$/))),
                        next: (c = 1 + c, -2 >= 23..toString() < ("function" == /[a2][^e]+$/) > (-0 === -0 === ("object" ^ -4))),
                        async: (c = 1 + c, foo_1 && (foo_1[(c = c + 1) + 5] /= (foo_1 = "" == {}) + {} / "b" > (1 <= 23..toString() != (3 !== ([ , 0 ].length === 2)))))
                    }[c = 1 + c, c_2 = (true ^ "a" && 22 != ([ , 0 ].length === 2)) < ((25 === -4) <= ({}, 
                    "foo"))]] ^= (3 & /[a2][^e]+$/) * (NaN ^ 5)))))]);
                } else if (a++ + (1 === 1 ? a : b)) {
                    var a = /[abc4]/g.exec(((c = 1 + c, void ("bar" !== "function" && 1 ^ 5)) || b || 5).toString());
                } else {
                    var brake12 = 5;
                    while ({}.in && --brake12 > 0) {
                    }
                }
            } else {
                --b + [];
            }
            break;

          default:
          case !function() {
                {
                    var expr15 = (c = c + 1) + [];
                    for (var key15 in expr15) {
                        c = 1 + c;
                        let b_1 = expr15[key15];
                        L25576: for (var brake16 = 5; --b + !function undefined() {
                            c = 1 + c, (foo_1 && (foo_1[c = 1 + c, (this ^ 24..toString()) * (1 ^ Infinity) + (foo_1 && (foo_1[--b + [ ..."" + foo_1, (c = 1 + c, 
                            ("" % null || -1 == "c") <= ((undefined ^ 22) === (this === 1))), (c = 1 + c, (key15 && (key15[--b + (1 === 1 ? a : b)] = (c_2 = -4 !== 23..toString()) !== 2 >> "undefined")) << (c = c + 1, 
                            Infinity ^ "number")), (c = 1 + c, a && (a.get |= [ , 0 ][1] + 23..toString() == "function" > NaN) && -5 === "object" | (-4 | 3)), (c = 1 + c, 
                            (c = c + 1, 4 < -1) && (Infinity || -2) - ("a" <= -5)) ][c = 1 + c, !"" % (0 - 38..toString()) * ((-0 ^ -4) == 2 - null)]] = (-2 ^ -4) !== -2 >> undefined))] = "b" | 3)) >> (-2 ^ -1) ^ (-0 <= 23..toString(), 
                            undefined | null);
                            c = 1 + c, ("function" >= /[a2][^e]+$/) - (c_2 && ([ c_2[c = 1 + c, (-4 || 38..toString()) === "" >> -0 & ("object", 
                            "b") >= (c_2 && ([ c_2.undefined ] = [ 38..toString() % true ]))] ] = [ 3 & 25 ])) >>> ("b" >= 4 | -3 ^ "number");
                            c = 1 + c, c = c + 1, (key15 && (key15[c = 1 + c, (a = undefined != false & (38..toString(), 
                            [])) % (-2 >= Infinity & 25 - [ , 0 ][1])] += "function" >>> Infinity)) != (Infinity == 25);
                        }() && brake16 > 0; --brake16) {
                            --b + {
                                undefined: (c = 1 + c, (5 < true) / (c = c + 1, true) > ("undefined" >= []) << ("c" >> "bar")),
                                "-2": (c = 1 + c, (c = c + 1, [ , 0 ].length === 2) << "bar" * /[a2][^e]+$/ <= (foo_2 = !NaN != "b" - "a"))
                            }.next;
                        }
                    }
                }
                {
                    var brake21 = 5;
                    L25577: do {
                        {
                            return;
                            --b + (--b + +function foo_2_2() {
                            }() || 5).toString()[b = a];
                        }
                    } while (--b + +function() {
                        var arguments_1 = (c = 1 + c, (Infinity || 1) <= (-0 != 0) !== (3 && -4) / (/[a2][^e]+$/ & 5));
                        try {
                            c = 1 + c, (0 != 38..toString(), 3 === -3) || 4 % /[a2][^e]+$/ < (2, 22);
                        } catch (yield) {
                        } finally {
                        }
                        {
                        }
                        {
                            var expr27 = (c = 1 + c, (/[a2][^e]+$/ == Infinity) >> -4 - 25 >> ("function" << "function" ^ ("function", 
                            4)));
                            for (var key27 in expr27) {
                                c = 1 + c, c = c + 1, 0 < 24..toString() <= ({} > "a");
                            }
                        }
                    }() && --brake21 > 0);
                }
            }():
            {
                var yield = (c = c + 1) + (c_2 = typeof (c = 1 + c, (a && (a.undefined /= (false ^ 22) <= 22 + 5)) <= (22 - -3 === 4 * "b"))), b_2_1 = (c = c + 1) + foo_2 ? typeof f2 == "function" && --_calls_ >= 0 && f2(4, (c = 1 + c, 
                (-4 - 38..toString() == {} < 22) >= ("undefined" > 2 == Infinity >> "b")), 38..toString()) : --b + (typeof f2 == "function" && --_calls_ >= 0 && f2()), {
                    set: yield_2,
                    Infinity: [ b_2, await_2 ] = (c = 1 + c, (0 / "undefined" ^ - -4) >> ("undefined" <= -5 <= (-0 > "a"))),
                    ...foo_1
                } = {
                    undefined: typeof f1 == "function" && --_calls_ >= 0 && f1(25, "bar", "c"),
                    Infinity: [ (c = 1 + c, (c = c + 1, "c") > (c_2 += 1 * [ , 0 ][1]) === (a && (a[b++] = -4 ^ "object" ^ ([ , 0 ].length === 2 ^ -5)))), (c = 1 + c, 
                    (("undefined" ^ 24..toString()) == ([ , 0 ].length === 2 !== 25)) <= (this | 22 | "undefined" == /[a2][^e]+$/)) ],
                    0: (c = c + 1) + (typeof foo_1_2 != "undefined")
                };
                for (var brake31 = 5; typeof a == "function" && --_calls_ >= 0 && a() && brake31 > 0; --brake31) {
                    a++ + b--;
                }
                var b_2 = b = a, a_2 = a++ + (--b + (c = 1 + c, (c = c + 1, -2) % ("c" != 3) === (("foo", 
                4) ^ "" >= 23..toString())) ? (c = c + 1) + (0 === 1 ? a : b) : ("" !== ([ , 0 ].length === 2)) < ("undefined" <= Infinity) ^ ("b" >>> "number" && 5 <= /[a2][^e]+$/));
            }
            {
                var brake35 = 5;
                while (1 in [ --b + [ (c = 1 + c, (foo_2 = [ , 0 ][1] < "c") !== NaN / "undefined" != !"b" - (false || 23..toString())) ].value ? --b + (-0 in [ (c = 1 + c, 
                c = c + 1, 0 > -3 === (c_2 && ({
                    done: c_2[c = 1 + c, (/[a2][^e]+$/ >>> 23..toString() ^ /[a2][^e]+$/ != this) != (null <= 22, 
                    23..toString() + {})]
                } = {
                    done: this != {}
                }))), (c = 1 + c, (c = c + 1, [ , 0 ][1] || true) ^ (undefined <= 0 || 3 >> "number")), (c = 1 + c, 
                (-0 >= {} && ("function", {})) ^ "bar" > NaN >= (c = c + 1, "c")) ]) : (c = c + 1) + (typeof f1 == "function" && --_calls_ >= 0 && f1()), (c = c + 1) + (0 === 1 ? a : b), a++ ] && --brake35 > 0) {}
            }
            break;

          case a++ + (b -= a):
            break;
        }
        break;

      case a++ + (foo_1 = void b):
        var yield_2;
        try {
            try {
                {
                    throw --b + {}.in;
                }
            } catch (b_1) {
                L25578: for (var brake41 = 5; foo_1 && brake41 > 0; --brake41) {
                    switch (a++) {
                      case --b + +function a_1() {}():
                        {
                            var brake43 = 5;
                            L25579: while ((c = 1 + c, b_1 && (b_1.async = (38..toString() % -3 || "function" <= 0, 
                            2 - -3 ^ 1 % /[a2][^e]+$/))) && --brake43 > 0) {
                                c = 1 + c, ("a" && 0) > "foo" * -0 & (0 % 24..toString() | -4 % -0);
                            }
                        }
                        break;

                      case -1 in {
                            static: (c = 1 + c, (foo_1 && (foo_1.next |= Infinity - "c") && 25 === -4) & ("c" != false) >>> ("a" | -5)),
                            set: (c = 1 + c, (24..toString() && "object") != ~null === ("c" & {}) / (undefined >= -3)),
                            NaN: (c = 1 + c, ((24..toString() ^ 3) !== NaN >= /[a2][^e]+$/) < ("b" !== /[a2][^e]+$/, 
                            true - "a")),
                            null: (c = 1 + c, (c = c + 1, "undefined" / -3) | 3 % undefined << Infinity - [ , 0 ][1])
                        }:
                        c = 1 + c, (undefined - 24..toString() != "a" >= "function") > (false !== 4 & ([] ^ 23..toString()));
                        break;

                      case --b + ("undefined" in [ (c = 1 + c, (+22 === 5 > 22) <= +(Infinity >>> "object")), (c = 1 + c, 
                        c = c + 1, ("foo" | "a") > (0 | 23..toString())), (c = 1 + c, "number" * -0 <= ({} | "undefined") !== "object" * /[a2][^e]+$/ * (undefined == [ , 0 ][1])) ]):
                        break;

                      default:
                        if (c = 1 + c, (-3 && null) * (5 < true) === (38..toString() >= 23..toString()) >>> ({} & 4)) {
                            c = 1 + c, ~(22 * NaN) ^ true << -4 >>> ("object" == 3);
                        }
                    }
                }
                {
                    var expr48 = [ --b + (b += a), ++a ];
                    for (const key48 of expr48) {
                        try {
                            var bar = --b + (c = 1 + c, ("" <= 23..toString()) + (foo_1.a *= 25 <= /[a2][^e]+$/) !== (-0 > 5 ^ -4 & "bar"));
                        } catch (undefined_1) {
                            {
                            }
                            if (c = 1 + c, (undefined_1 && (undefined_1[/[abc4]/.test(((c = 1 + c, (foo_2 && (foo_2.in /= !3 + (-2 <= []))) - ((-1 || 22) > ("number" == 3))) || b || 5).toString())] %= (5 | 1) != ([ , 0 ][1] ^ 22))) ^ "number" << /[a2][^e]+$/ === (NaN & this)) {
                                c = 1 + c, (-2, -2) >> (foo_2 && (foo_2.get = this || NaN)) > (0 / 38..toString() == ("b" && 0));
                            } else {
                                c = 1 + c, 3 / 24..toString() > (undefined === false) ^ 4 == 23..toString() === -3 < null;
                            }
                        } finally {
                            c = c + 1;
                        }
                    }
                }
            } finally {
                break;
                yield_2;
            }
        } finally {
            var foo_1 = 1 === 1 ? a : b, a_1;
            {
                L25580: {}
            }
        }

      case --b + void function a_2() {
            L25581: for (var brake62 = 5; a++ + (typeof a == "function" && --_calls_ >= 0 && a("c", -5)) && brake62 > 0; --brake62) {
                var a_2 = /[a2][^e]+$/;
            }
            if ({}[--b]) {
                var expr65 = --b + (0 === 1 ? a : b);
                for (var key65 in expr65) {
                    c = c + 1;
                }
            }
            L25582: {
                var a_2;
                {
                    var brake71 = 5;
                    do {
                        var a_1 = "object" in {
                            [(c = 1 + c, 3 + -3 <= (this ^ "undefined") > (c = c + 1, "function") + ("function" == 0))]: (c = 1 + c, 
                            ({} & -4) + (NaN == null) != ("bar" - undefined | undefined ^ "bar"))
                        }, a = --b + (("" < true && 23..toString() & -0) !== (2 & 22 || a && ([ a[c = 1 + c, 
                        (c = c + 1, "c" <= 24..toString()) === (-3 >= 3) >>> (NaN || [ , 0 ].length === 2)] ] = [ undefined ^ "bar" ])));
                    } while ((a_2 && (a_2.set -= (yield_2 |= 38..toString() % [ , 0 ][1]) > (-2 != "bar"))) << ("function" * false !== (5, 
                    -2)) && --brake71 > 0);
                }
            }
            {
                switch (--b + new function foo_2(async, a) {
                    switch (c = 1 + c, -3 <= 25 <= (yield_2 += "function" | -1) && (c = c + 1, ([ , 0 ].length === 2) <= "b")) {
                      case c = 1 + c, (a && (a[--b + (async && async[c = 1 + c, (!"" == "undefined" / -2) << (this < -4) - (Infinity ^ "function")])] = (async >>= /[a2][^e]+$/ ^ []) & 1 > Infinity)) > (true < /[a2][^e]+$/) - ("number" | "function"):
                        ;
                        break;

                      default:
                        ;

                      case c = 1 + c, c_2 && (c_2[void function arguments() {
                            c = 1 + c, ~("bar" >= ([ , 0 ].length === 2)) * (("bar" & true) * (38..toString() || -4));
                            c = 1 + c, a_2 && (a_2["number" in {
                                static: (c = 1 + c, (c = c + 1, 4 ^ undefined) && 22 - -2 == (Infinity ^ /[a2][^e]+$/)),
                                c: (c = 1 + c, (23..toString() & undefined) >>> ("foo" !== null) ^ +"number" <= ("object" > -4))
                            }] = 5 ^ /[a2][^e]+$/ | true >>> 5 || 23..toString() == Infinity == ("c", "number"));
                            c = 1 + c, a_2 && ({
                                NaN: a_2[--b + (typeof f2 == "function" && --_calls_ >= 0 && f2((c = 1 + c, ("" > "") - NaN * 24..toString() + ((NaN ^ []) & 23..toString() >>> [ , 0 ][1]))))]
                            } = {
                                NaN: (-3 >> /[a2][^e]+$/) - ("c", "c") === 38..toString() % "function" + (undefined > 4)
                            });
                            c = 1 + c, (Infinity * "function" < (5 > 3)) >>> (Infinity * ([ , 0 ].length === 2) ^ ("" ^ -3));
                        }()] = +NaN !== -0 < "function" !== (delete Infinity == (false ^ 23..toString()))):
                        ;
                        break;

                      case c = 1 + c, (NaN < 1 !== 24..toString() + 24..toString()) <= ((-1 | 25) <= ("foo" > 1)):
                        ;
                    }
                    switch (c = 1 + c, void Infinity % (null | "a") | (38..toString() || "function" || this > 24..toString())) {
                      case c = 1 + c, (3 + -1 | "number" ^ 25) >> (([] && 25) << (async += 2 ^ "")):
                        ;
                        break;

                      default:
                        ;

                      case c = 1 + c, ((c = c + 1, "") | ("foo" && -1)) / (a = "bar" % -0 ^ 22 === -1):
                        ;

                      case c = 1 + c, (a = -2 > 4) << (c = c + 1, "a") > (false & "" && (false || -0)):
                        ;
                        break;
                    }
                }()) {
                  default:
                  case void function await_2() {
                        {
                            var brake82 = 5;
                            do {
                                c = 1 + c, "undefined" * "c" + (/[a2][^e]+$/, [ , 0 ][1]) != ([ , 0 ].length === 2 ^ 25 | (a_2 && (a_2.async += NaN - NaN)));
                            } while ((c = 1 + c, c = c + 1, 3 % ([ , 0 ].length === 2) !== ("function", 22)) && --brake82 > 0);
                        }
                    }():
                    {
                        return a++ + yield_2;
                    }
                    break;

                  case typeof f1 == "function" && --_calls_ >= 0 && f1(-4, a && typeof a.set == "function" && --_calls_ >= 0 && a.set((c = 1 + c, 
                    (c = c + 1, undefined * "number") === (-3 << "function") + (true ^ 2)), (c = 1 + c, 
                    ("function" / -0 == "a" * -2) >>> (yield_2 && (yield_2[b++] %= [] > [ , 0 ][1] === 23..toString() << 38..toString())))), a++ + (a && a[c = 1 + c, 
                    a_2 && (a_2[(c = c + 1) + (0 === 1 ? a : b)] >>>= (null != 0) - (23..toString() + {}) ^ 5 <= /[a2][^e]+$/ !== -1 < -5)])):
                    {
                        var foo_2 = function f1(Infinity, b_1) {
                        }((c = 1 + c, (a && (a[c = 1 + c, (c = c + 1, undefined / 25) % (yield_2 += "number" + -4 ^ -2 !== -4)] += 24..toString() ^ NaN)) * ("b" % /[a2][^e]+$/) ^ -("b" ^ 3)), this);
                    }
                    switch (~((5 - 3) / ([] === "object"), "foo" >>> 24..toString() < (1 || -0))) {
                      case yield_2:
                        c = 1 + c, foo_2 = 38..toString() * -1 !== (this, [ , 0 ].length === 2), (2 | Infinity) ^ (a *= NaN !== 3);
                        break;

                      case --b + (foo_1 && typeof foo_1.next == "function" && --_calls_ >= 0 && foo_1.next([])):
                        c = 1 + c, (foo_2 && (foo_2[c = 1 + c, (c_2 && (c_2.in = ([ , 0 ].length === 2) - 2)) >>> (NaN === /[a2][^e]+$/) !== (23..toString() >>> -2, 
                        true / 5)] *= [] >>> 0)) - (c_2 && ([ c_2.done ] = [ [ , 0 ][1] == {} ])) - (~{} << ([ , 0 ].length === 2) * -4);
                        break;

                      case typeof (c = 1 + c, yield_2 && (yield_2[(delete b || 8).toString()[((c = 1 + c, 
                        ("a" + "a") * ![ , 0 ][1] ^ +([ , 0 ][1] < 3)) || 0).toString()[c = 1 + c, (([ , 0 ][1] && -0) != -3 + "foo") + (("foo" & "b") - (-2 - "undefined"))]]] += "object" * 22 === (c = c + 1, 
                        /[a2][^e]+$/) ^ ((c = c + 1, "a") | "bar" ^ []))):
                        break;

                      default:
                        c = 1 + c, (null - 23..toString() | 4 & this) % ((-0 | [ , 0 ].length === 2) <= (c = c + 1, 
                        4));
                        c = 1 + c, (yield_2 ^= (foo_2 && (foo_2[c = 1 + c, ("c" | -0) - (25 || "a") + ((Infinity && 22) >> (c = c + 1, 
                        false))] %= 5 ^ "b")) <= ([] == 38..toString())) && (this != "function") - ("function" < -2);
                    }
                    break;

                  case a++ + b++:
                    return;
                }
                c = c + 1;
                var a_1 = a, b_1 = --b + (typeof b_1 == "function" && --_calls_ >= 0 && b_1([ , 0 ][1], -2));
            }
        }():
        L25583: for (var brake94 = 5; (c = c + 1) + ("a" in [ (c = c + 1) + (a++ + /[abc4]/.test((typeof f3 == "function" && --_calls_ >= 0 && f3(0, ..."" + foo_1) || b || 5).toString()) || a || 3).toString(), a++ + b--, (c = c + 1) + (typeof f3 == "function" && --_calls_ >= 0 && f3(-4, --b + ((-3 <= -5 ^ 0 - -3) + (yield_2 && (yield_2[~b] %= (foo_1 && ([ foo_1.Infinity ] = [ "bar" > "c" ])) !== (null == null)))))), {}[void ((true === [ , 0 ][1]) <= (c = c + 1, 
        "foo") >= ((c = c + 1, 25) ^ 1 < 25))] ]) && brake94 > 0; --brake94) {
            var expr95 = ~a;
            L25584: for (var key95 in expr95) {
                c = 1 + c;
                var b_1 = expr95[key95];
                L25585: {
                    switch ((c = c + 1) + [].Infinity) {
                      case "b":
                        {
                        }
                        return c = 1 + c, 3 > undefined < (-4 < "bar") ^ ("c" ^ -0) !== !this;
                        break;

                      case ("function" ^ Infinity) == ("undefined" & "foo") == delete "a" >>> (Infinity ^ 23..toString()):
                        if (c = 1 + c, ([ , 0 ][1] === 22) % (NaN != "object") != (c = c + 1, 38..toString()) % (c = c + 1, 
                        "object")) {
                            c = 1 + c, (true === 38..toString() ^ "c" + "c") < (c = c + 1, "foo") >>> delete 0;
                        } else {
                            c = 1 + c, (true >> -3 == 25 >> 23..toString()) <= (([ , 0 ].length === 2 && "b") == "foo" <= -1);
                        }
                        try {
                            c = 1 + c, (24..toString() !== "a") + (([ , 0 ].length === 2) + 0) ^ (key95 && (key95["function" in {
                                [(c = 1 + c, true % 5 >>> (foo_1 && (foo_1[c = 1 + c, (yield_2 && (yield_2.next *= 4 != Infinity & (c_2 && (c_2[c = 1 + c, 
                                -"" | 1 >= "c" | (23..toString() >= "foo") >> ("c" & {})] = -3 ^ /[a2][^e]+$/)))) % ((1 > "b") + (4 >>> "function"))] *= "" & 22)) == ("object" === 24..toString() | -3 - "foo"))]: (c = 1 + c, 
                                ("foo" & -2) <= -5 << 23..toString(), ("bar", "undefined") | 24..toString() > 5),
                                ...c_2,
                                [(c = 1 + c, (25 || NaN) != 1 << ([ , 0 ].length === 2) ^ (b_1 && (b_1.null = [ , 0 ][1] / 25)) % ([] !== {}))]: (c = 1 + c, 
                                ((c = c + 1, "c") == (5 != "c")) << (("b" === 23..toString()) <= -2 % 0)),
                                set: (c = 1 + c, (foo_1 && (foo_1.b = null * 1)) < Infinity << "number", 5 << "object" < (1 <= undefined))
                            }] += null / undefined != ([ , 0 ].length === 2) < "number"));
                        } catch (b_2) {
                        }
                        break;

                      default:
                      case (c = c + 1) + /[abc4]/g.exec((((c = 1 + c, (25 >>> 3 || 0 << 1) % (c = c + 1, 
                        [] >= "")) || a || 3).toString() || b || 5).toString()):
                        c = c + 1;
                        break;
                    }
                    {
                        var brake106 = 5;
                        do {
                            var NaN_1 = foo_2, yield_2_1 = a++ + ((c = 1 + c, +("" >>> "function" === 25 * "")) ? (c = 1 + c, 
                            "a" <= 38..toString() > null - 25 | (2 >>> ([ , 0 ].length === 2)) / (b_1 && (b_1[c = 1 + c, 
                            4 * NaN * ([ , 0 ].length === 2 && -3) != (c = c + 1, undefined < 23..toString())] = 0 >> this))) : (c = 1 + c, 
                            (-5 && 2) << ![ , 0 ][1] !== ([] ^ -4) >> (0 >> "b")));
                        } while (a++ + foo_1 && --brake106 > 0);
                    }
                }
            }
        }
        break;
    }
}

var await = f0(undefined, -3);

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

(function f0(f, o, a) {
    var t, i, n, e, c, r, s, N, u, l, y;
    switch (--p + p--) {
      default:
        for (t = 5; "bar" in [ i++ + (Infinity in [ typeof (i++ + /[abc4]/g.exec((v = 1 + v, 
        (0 ^ NaN >> (o >>>= !0) || p || 5).toString()))), --p + /[abc4]/.test((p || 5).toString()) ]), "function" == typeof o && 0 <= --b && o(-0), --p + ("function" == typeof o && 0 <= --b && o(--p + --p, (v += 1) + ((v += 1) + !0 || i || 3).toString(), this)), p++ ] && 0 < t; --t) {
            v += 1;
        }

      case !0 ^ (v += 1, 2 === [ , 0 ].length) ^ (v += 1, v += 1, 2):
        switch (i++ + !0) {
          case ((v += 1) + i || i || 3).toString():
            for (a in i++ + (!0 in {})) {
                v = 1 + (1 + (1 + (1 + (v + 1)))), o >>= (o && (o[v = 1 + v, a += 0 != !((2 === [ , 0 ].length) % "38")] = !1)) + NaN, 
                v = 1 + v, (i || 3).toString(), {
                    ...a
                }, --p;
            }
            if (f && "function" == typeof f.in && 0 <= --b && f.in(2, {}, -0)) {
                if ((v += 1) + (3 in [ (v += 1) + ++i, void 0, i++ + o, (v += 1) + --p, {}.value ])) {
                    return v += 1, o && o[i++ + (v = 1 + v, (a && (a.done = !1)) / -5 < 0 ? (v = 1 + v, 
                    (-2 & (o && (o[v = 1 + v, !1] *= 1))) >> (!1 | (a && ({
                        NaN: a[v = 1 + v, !0]
                    } = {
                        NaN: !1
                    })))) : (v = 1 + v, (o && (o.next = !1)) >= (v += 1, "38") & (a && (a[--p + {
                        then: (v = 1 + v, o && ({
                            set: o[-2]
                        } = {
                            set: (a %= !0) < 0
                        })),
                        then: NaN << (NaN & (o = 0)),
                        async: !0,
                        next: !1,
                        async: (v = 1 + (1 + (1 + (1 + v))), f && (f[(v += 1) + 5] /= (f = !1) + NaN > (1 != (3 !== (2 === [ , 0 ].length)))))
                    }[v = 1 + v, o = (22 != (2 === [ , 0 ].length)) < !1]] ^= 0))))];
                }
                if (i++ + i) {
                    i = /[abc4]/g.exec((v = 1 + v, (p || 5).toString()));
                } else {
                    for (n = 5; {}.in && 0 < --n; ) {}
                }
            } else {
                --p;
            }
            break;

          default:
          case !function() {
                var t, n, e;
                for (t in (v += 1) + []) {
                    for (v = 1 + v, e = 5; --p + !function undefined() {
                        v = 1 + v, f && (f[v = 1 + v, ("24" ^ this) + (f && (f[--p + [ ..."" + f, !1 <= (22 === (1 === this)), (v = 1 + (1 + v), 
                        (t && (t[--p + i] = 2 !== (o = !0))) << 0), (v = 1 + (v + 1), i && (i.get |= !1) && -1), !1 ][v = 1 + (1 + v + 1), 
                        0]] = !0))] = 3), v = 1 + v, o && ([ o[v = 1 + v, !1 & (o && ([ o.undefined ] = [ 0 ])) <= "b"] ] = [ 1 ]), 
                        v = 1 + v, v += 1, t && (t[v = 1 + v, (i = 0) % 0] += 0);
                    }() && 0 < e; --e) {
                        --p, v = 1 + (1 + v + 1), v += 1, a = !0;
                    }
                }
                n = 5;
                do {
                    return;
                } while (--p + +function() {
                    v = 1 + v;
                    try {
                        v = 1 + v;
                    } catch (t) {}
                    for (var t in v = 1 + v, 0) {
                        v = 1 + v, v += 1;
                    }
                }() && 0 < --n);
            }():
            v = 1 + (v + 1), o = typeof ((i && (i.undefined /= !0)) <= !1), (v += 1) + a ? "function" == typeof f2 && 0 <= --b && f2(4, (v = 1 + v, 
            !1), "38") : (--p, "function" == typeof f2 && 0 <= --b && f2());
            for (var {
                set: h,
                Infinity: [],
                ...f
            } = {
                undefined: "function" == typeof f1 && 0 <= --b && f1(25, "bar", "c"),
                Infinity: (v = 1 + v, v += 1, o += 0, i && (i[p++] = 2 === [ , 0 ].length ^ -5 ^ -4), 
                v = 1 + v),
                0: (v += 1) + ("undefined" != typeof foo_1_2)
            }, d = 5; "function" == typeof i && 0 <= --b && i() && 0 < d; --d) {
                i++, p--;
            }
            for (p = i, i++, --p + (v = 1 + v, 4 == (v += 1, -0)) && (v += 1), e = 5; 1 in [ --p + [ (v = 1 + v, 
            NaN !== (a = !1) != -23) ].value ? --p + (-0 in [ (v = 1 + v, v += 1, !0 === (o && ({
                done: o[v = 1 + v, (0 ^ /[a2][^e]+$/ != this) != "23" + {}]
            } = {
                done: this != {}
            }))), 2, (v = 1 + (1 + v + 1), !1 ^ (v += 1, !1)) ]) : (v += 1) + ("function" == typeof f1 && 0 <= --b && f1()), (v += 1) + p, i++ ] && 0 < --e; ) {}
            break;

          case i++ + (p -= i):
        }
        break;

      case i++ + (f = void 0):
        try {
            try {
                throw --p + {}.in;
            } catch (l) {
                for (c = 5; f && 0 < c; --c) {
                    switch (i++) {
                      case --p + NaN:
                        for (r = 5; v = 1 + v, l && (l.async = 5) && 0 < --r; ) {
                            v = 1 + v;
                        }
                        break;

                      case -1 in {
                            static: (v = 1 + v, 0 & (f && (f.next |= NaN) && !1)),
                            set: (v = 1 + v, !1),
                            NaN: (v = 1 + v, !1),
                            null: (v = 1 + v, 0 | (v += 1, NaN))
                        }:
                        v = 1 + v;
                        break;

                      case --p + ("undefined" in [ (v = 1 + v, !0), (v = 1 + v, v += 1, !1), (v = 1 + v, 
                        !0) ]):
                        break;

                      default:
                        v = 1 + v;
                    }
                }
                for (const g of [ --p + (p += i), ++i ]) {
                    try {
                        --p, v = 1 + v, f.a *= !1;
                    } catch (t) {
                        v = 1 + v, (t && (t[/[abc4]/.test((v = 1 + v, ((a && (a.in /= 1)) - !1 || p || 5).toString()))] %= !0)) ^ 0 == (NaN & this) ? (v = 1 + v, 
                        a && (a.get = this || NaN)) : v = 1 + v;
                    } finally {
                        v += 1;
                    }
                }
            } finally {
                break;
            }
        } finally {
            f = i;
        }

      case --p + void function a_2() {
            for (var a_2, t, n, e, a, i = 5; e++ + ("function" == typeof e && 0 <= --b && e("c", -5)) && 0 < i; --i) {
                a_2 = /[a2][^e]+$/;
            }
            if ({}[--p]) {
                for (t in --p + p) {
                    v += 1;
                }
            }
            for (n = 5; v = 1 + (1 + v + 1), e = --p + !0, (a_2 && (a_2.set -= !0 < (h |= NaN))) << !0 && 0 < --n; ) {}
            switch (--p + new function foo_2(t, n) {
                switch (v = 1 + v, !0 <= (h += -1) && (v += 1, (2 === [ , 0 ].length) <= "b")) {
                  case v = 1 + v, 0 < (n && (n[--p + (t && t[v = 1 + v, !1 << +(this < -4)])] = !1 & (t >>= 0))):
                    break;

                  default:
                  case v = 1 + v, o && (o[void function arguments() {
                        v = 1 + (1 + v), a_2 && (a_2["number" in {
                            static: !1,
                            c: (v = 1 + (1 + v + 1), 0)
                        }] = 5), v = 1 + v, a_2 && ({
                            NaN: a_2[--p + ("function" == typeof f2 && 0 <= --b && f2((v = 1 + v, NaN)))]
                        } = {
                            NaN: !1
                        }), v = 1 + v;
                    }()] = 1 != (23 == delete Infinity)):
                  case v = 1 + v, !0:
                }
                switch (38) {
                  case v = 1 + (1 + v), 27 >> (25 << (t += 2)):
                    break;

                  case v = 1 + (1 + v + 1), (n = 0) < (n = !1) << (v += 1, "a"):
                }
            }()) {
              default:
              case void function await_2() {
                    for (var t = 5; v = 1 + v, a_2 && (a_2.async += NaN), v = 1 + v, v += 1, 3 % (2 === [ , 0 ].length) != 22 && 0 < --t; ) {}
                }():
                return e++ + h;

              case "function" == typeof f1 && 0 <= --b && f1(-4, e && "function" == typeof e.set && 0 <= --b && e.set(!1, (v = 1 + (1 + v + 1), 
                !1 >>> (h && (h[p++] %= !1)))), e++ + (e && e[v = 1 + v, a_2 && (a_2[(v += 1) + p] >>>= 0)])):
                switch (v = 1 + v, a = void (e && (e[v = 1 + v, v += 1, NaN % (h += 1)] += 24)), 
                -2) {
                  case h:
                    v = 1 + v, a = -38 !== (2 === [ , 0 ].length), e *= !0;
                    break;

                  case --p + (f && "function" == typeof f.next && 0 <= --b && f.next([])):
                    v = 1 + v, a && (a[v = 1 + v, (o && (o.in = (2 === [ , 0 ].length) - 2)) >>> !1 != .2] *= 0), 
                    o && ([ o.done ] = [ !1 ]);
                    break;

                  case v = 1 + v, typeof (h && (h[("" + (delete p || 8))["1"[v = 1 + (1 + v), NaN]]] += NaN === (v += 1, 
                    /[a2][^e]+$/) ^ (0 | (v += 1, "a")))):
                    break;

                  default:
                    v = 1 + (1 + v + 1), h ^= (a && (a[v = 1 + v, (22 >> (v += 1, !1)) - 25] %= 5)) <= !1;
                }
                break;

              case e++ + p++:
                return;
            }
            v += 1, --p;
        }():
        for (s = 5; (v += 1) + ("a" in [ (v += 1) + (i++ + /[abc4]/.test(("function" == typeof f3 && 0 <= --b && f3(0, ..."" + f) || p || 5).toString()) || i || 3).toString(), i++ + p--, (v += 1) + ("function" == typeof f3 && 0 <= --b && f3(-4, --p + (3 + (h && (h[~p] %= !0 !== (f && ([ f.Infinity ] = [ !1 ]))))))), {}[v += 1, 
        void (v += 1)] ]) && 0 < s; --s) {
            for (u in N = ~i) {
                switch (v = 1 + v, l = N[u], (v += 1) + [].Infinity) {
                  case "b":
                    return v = 1 + v;

                  case !1:
                    v = 1 + (1 + v + 1 + 1), v += 1;
                    try {
                        v = 1 + v, u && (u["function" in {
                            [(v = 1 + v, 1 >>> (f && (f[v = 1 + v, (h && (h.next *= !0 & (o && (o[v = 1 + v, 
                            0] = -3)))) % 4] *= 0)) == 0)]: (v = 1 + v, 1),
                            ...o,
                            [(v = 1 + v, 25 != 1 << (2 === [ , 0 ].length) ^ (l && (l.null = 0)) % !0)]: 0,
                            set: (v = 1 + (1 + v + 1), f && (f.b = 0), !1)
                        }] += NaN != (2 === [ , 0 ].length) < "number");
                    } catch (t) {}
                    break;

                  default:
                  case (v += 1) + /[abc4]/g.exec((v = 1 + v, v += 1, ((i || 3).toString() || p || 5).toString())):
                    v += 1;
                }
                for (y = 5; i++, v = 1 + (1 + v), l && (l[v = 1 + v, NaN * (2 === [ , 0 ].length && -3) != (v += 1, 
                !1)] = 0 >> this), i++ + f && 0 < --y; ) {}
            }
        }
    }
})(void 0, -3), console.log(null, 100, p, v, Infinity, NaN, void 0);
original result:
null 100 -5 140 Infinity NaN undefined

uglified result:
evalmachine.<anonymous>:1
(function(){var b=10,p=10,v=0;(function f0(f,o,a){var t,i,n,e,c,r,s,N,u,l,y;switch(--p+p--){default:for(t=5;"bar"in[i+++(Infinity in[typeof(i+++/[abc4]/g.exec((v=1+v,(0^NaN>>(o>>>=!0)||p||5).toString()))),--p+/[abc4]/.test((p||5).toString())]),"function"==typeof o&&0<=--b&&o(-0),--p+("function"==typeof o&&0<=--b&&o(--p+--p,(v+=1)+((v+=1)+!0||i||3).toString(),this)),p++]&&0<t;--t)v+=1;case!0^(v+=1,2===[,0].length)^(v+=1,v+=1,2):switch(i+++!0){case((v+=1)+i||i||3).toString():for(a in i+++(!0 in{}))v=1+(1+(1+(1+(v+1)))),o>>=(o&&(o[v=1+v,a+=0!=!((2===[,0].length)%"38")]=!1))+NaN,v=1+v,(i||3).toString(),{...a},--p;if(f&&"function"==typeof f.in&&0<=--b&&f.in(2,{},-0)){if((v+=1)+(3 in[(v+=1)+ ++i,void 0,i+++o,(v+=1)+--p,{}.value]))return v+=1,o&&o[i+++(v=1+v,(a&&(a.done=!1))/-5<0?(v=1+v,(-2&(o&&(o[v=1+v,!1]*=1)))>>(!1|(a&&({NaN:a[v=1+v,!0]}={NaN:!1})))):(v=1+v,(o&&(o.next=!1))>=(v+=1,"38")&(a&&(a[--p+{then:(v=1+v,o&&({set:o[-2]}={set:(a%=!0)<0})),then:NaN<<(NaN&(o=0)),async:!0,next:!1,asy

TypeError: undefined is not a function
    at f0 (evalmachine.<anonymous>:1:1911)
    at evalmachine.<anonymous>:1:5373
    at evalmachine.<anonymous>:1:5433
    at ContextifyScript.Script.runInContext (vm.js:59:29)
    at Object.runInContext (vm.js:120:6)
    at run_code_vm (/home/runner/work/UglifyJS/UglifyJS/test/sandbox.js:257:12)
    at Object.exports.run_code (/home/runner/work/UglifyJS/UglifyJS/test/sandbox.js:37:16)
    at run_code (/home/runner/work/UglifyJS/UglifyJS/test/ufuzz/index.js:2082:20)
    at /home/runner/work/UglifyJS/UglifyJS/test/ufuzz/index.js:2482:29
    at Array.forEach (<anonymous>)
// reduced test case (output will differ)

// (beautified)
switch (0) {
  default:
  case console.log(foo_1):
    var {
        Infinity: [] = 0,
        ...foo_1
    } = {
        Infinity: []
    };
}
// output: undefined
// 
// minify: TypeError: Cannot read property 'Symbol(Symbol.iterator)' of undefined
// options: {
//   "compress": {
//     "hoist_vars": true,
//     "keep_infinity": true,
//     "passes": 1000000,
//     "unsafe": true
//   },
//   "keep_fnames": true,
//   "toplevel": true,
//   "mangle": {
//     "v8": true
//   },
//   "output": {
//     "v8": true
//   },
//   "validate": true
// }
minify(options):
{
  "compress": {
    "hoist_vars": true,
    "keep_infinity": true,
    "passes": 1000000,
    "unsafe": true
  },
  "keep_fnames": true,
  "toplevel": true,
  "mangle": {
    "v8": true
  },
  "output": {
    "v8": true
  }
}

Suspicious compress options:
  unsafe
  unused
@alexlamsl alexlamsl added the bug label Jul 20, 2021
alexlamsl added a commit to alexlamsl/UglifyJS that referenced this issue Jul 20, 2021
alexlamsl added a commit that referenced this issue Jul 20, 2021
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