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

Closed
alexlamsl opened this issue Jun 20, 2024 · 0 comments · Fixed by #5859
Closed

ufuzz failure #5856

alexlamsl opened this issue Jun 20, 2024 · 0 comments · Fixed by #5859
Labels

Comments

@alexlamsl
Copy link
Collaborator

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

switch (a++ + a) {
  case --b + (typeof foo_2 != "unknown"):
    L55371: for (var brake2 = 5; typeof bar_1 !== "boolean" && brake2 > 0; --brake2) {
        L55372: for (var brake3 = 5; --b + (a && a.get) && brake3 > 0; --brake3) {
            var brake4 = 5;
            L55373: while (a && typeof a.Infinity == "function" && --_calls_ >= 0 && a.Infinity(...[ typeof a == "function" && --_calls_ >= 0 && a(b + 1 - .1 - .1 - .1), ..."" + a ]) && --brake4 > 0) {
                var expr5 = (c = c + 1) + ((c = c + 1) + ((a += (true > true) >> ("" === "c")) >> (false == "object" || 5 != 5)));
                for (var key5 in expr5) {
                    c = 1 + c;
                    var b_2 = expr5[key5];
                    {
                        var brake6 = 5;
                        do {
                            var foo_1 = {
                                "-2": (c = c + 1) + function arguments() {
                                }()
                            }[--b + (b = a)], b_2 = typeof f0 == "function" && --_calls_ >= 0 && f0();
                        } while (a++ + (typeof foo === "crap") && --brake6 > 0);
                    }
                }
            }
        }
    }
    for (var brake8 = 5; [ {}[--b + (typeof a == "function" && --_calls_ >= 0 && a(this))], a += --b + [] ] && brake8 > 0; --brake8) {
        a++ + (typeof a == "function" && --_calls_ >= 0 && a((c = c + 1) + a, /[a2][^e]+$/));
    }
    for (var brake10 = 5; +function() {}() && brake10 > 0; --brake10) {
        var brake11 = 5;
        L55374: while (b-- && --brake11 > 0) {
            +a;
        }
    }

  default:
    L55375: for (var brake13 = 5; --b + (3 in [ a++ + (--b + [ --b + (a && a[--b + "undefined"]), (c = c + 1) + ("b" in {}) ]) ]) && brake13 > 0; --brake13) {
        var undefined = function f0(undefined, a_2, a_2) {
            {
                var brake15 = 5;
                do {
                    c = c + 1;
                } while ((a_2 >>= a_2 && a_2.null) && --brake15 > 0);
            }
            {
                var brake17 = 5;
                do {
                    try {
                        {
                            var undefined_2 = function foo_2() {
                                c = 1 + c, c = c + 1, (a_2 && (a_2[c = 1 + c, a_2 && (a_2.NaN |= ("bar", 
                                1) / (24..toString() % 23..toString())), (undefined && ({
                                    [(c = 1 + c, c = c + 1, -([ , 0 ][1] + "foo"))]: undefined.next
                                } = {
                                    async: "bar" === true
                                })) > (25 && 0)] += 25 / null)) + ("a" >>> "b");
                            }(-2, (c = c + 1) + (0 === 1 ? a : b), -0);
                        }
                    } catch (b_2) {
                        return;
                    } finally {}
                } while (--b + (undefined_2 = a_2 && typeof a_2.foo == "function" && --_calls_ >= 0 && a_2.foo(/[a2][^e]+$/)) && --brake17 > 0);
            }
        }(-4);
    }
    {
        if (a++ + (--b + (b + 1 - .1 - .1 - .1) ? --b + (a++ + void a || a || 3).toString() : delete (23..toString() >> "") > (undefined = "object" - 38..toString()) % ("object" % "function"))) {
            void ((([ , 0 ].length === 2) < "function" < (-5 < "object")) * ((4 ^ -2) === (0 !== -5)));
        }
    }

  case (c = c + 1) + +function yield_1() {
        {
            var a_2 = function f1(b_1, yield_1_2) {
                c = c + 1;
                {
                    var let_2 = function f2(a_1) {
                        try {
                            c = 1 + c, yield_1_2.undefined += NaN >= "number" <= 25 + 5 > (("object" & [ , 0 ][1]) === (-4 ^ -3));
                        } catch (a_2) {
                            c = 1 + c, ~(22 > [ , 0 ][1] === 23..toString() % undefined);
                        }
                    }((c = c + 1) + 1, --b + yield_1_2?.[!((b_1 += (undefined >> "b") % ("function" || 1)) <= (("b", 
                    -5) && false / -1))], 2);
                }
            }(false);
        }
        {
            var brake32 = 5;
            do {
                return (--b + void function() {
                    {
                        var brake34 = 5;
                        L55376: do {
                            var async;
                        } while (true in {
                            in: (c = 1 + c, ((0 >> false) + (true >= -4)) * ((c = c + 1, 
                            false) & "function" !== "a"))
                        } && --brake34 > 0);
                    }
                }() || 6).toString()[--b + "function"];
            } while ((c = c + 1) + (([ , 0 ].length === 2) in [ a_2 ]) && --brake32 > 0);
        }
        try {
            c = c + 1;
        } finally {
            {
                for (var brake39 = 5; ((c = c + 1) + b++ ? --b : a++ + a--) && brake39 > 0; --brake39) {
                    return a++ + (a++ + (typeof a_2 == "function" && --_calls_ >= 0 && a_2((c = 1 + c, 
                    [] <= /[a2][^e]+$/ == "object" <= "c" & (yield_1 && ([ yield_1[a_2 = (c = 1 + c, 
                    ((yield_1 && (yield_1.NaN <<= 4 === 38..toString())) << 4 % ([ , 0 ].length === 2)) * ((undefined == 3) <= (-4 >= "bar")))] ] = [ (undefined += "bar" & Infinity) + (22 < "undefined") ]))))) || 0).toString()[typeof undefined == "function" && --_calls_ >= 0 && undefined()];
                }
                c = c + 1;
                L55377: {
                    {
                        var brake43 = 5;
                        L55378: while ((~4 ^ ([ , 0 ].length === 2) * null) >= !"a" / (-5 ?? 22) && --brake43 > 0) {
                            switch (c = 1 + c, (-2 * "b" && 25 ^ "number") == ("number" ^ NaN, 
                            "number" <= -0)) {
                              case c = 1 + c, ("number" != "function" != true >> "b") - ("foo" <= null) * -25:
                                ;
                                break;

                              case c = 1 + c, (a_2 && (a_2[--b + (typeof f3 == "function" && --_calls_ >= 0 && f3())] &= 4 > "function" >= ("b" > []))) + ((22 | true) << (5 !== 5)):
                                ;
                                break;

                              case c = 1 + c, (("undefined" && 24..toString()) ^ true === "undefined") > Number(0xdeadn << 16n | 0xbeefn) * "undefined" % ("c" < ""):
                                ;
                                break;

                              default:
                                ;
                            }
                        }
                    }
                }
            }
        }
        L55379: for (var brake45 = 5; a++ + (a_2 && a_2.foo) && brake45 > 0; --brake45) {
            var a_2 = a++ + (typeof a_2_1 == "string");
            {
                var brake48 = 5;
                L55380: while ((c = c + 1) + typeof a-- && --brake48 > 0) {
                    var expr49 = --b + a--;
                    L55381: for (var key49 in expr49) {
                        c = 1 + c;
                        const bar_1 = expr49[key49];
                        for (var brake50 = 5; {
                            [(c = 1 + c, (23..toString() >> "object" >> "b" % -5) * ((24..toString() ^ []) !== ("c" ^ -5)))]: (c = 1 + c, 
                            ([ , 0 ].length === 2) << null & NaN / "undefined" || (22 != [ , 0 ][1]) * ("bar" ^ "b")),
                            "-2": (c = 1 + c, 38..toString() <= null === (23..toString() != -1) && (-0 && "bar") ^ (23..toString() && "b"))
                        }[a++ + (yield_1 && typeof yield_1.NaN == "function" && --_calls_ >= 0 && yield_1.NaN((c = 1 + c, 
                        yield_1 && (yield_1.next += (bar_1 && (bar_1[--b + --b] = -0 != 5 || "number" >> "")) | [] ^ "number" ^ false >>> NaN))))] && brake50 > 0; --brake50) {
                            L55382: {
                                c = 1 + c, (0 > "foo") ** (-4 / "foo") >= (1 >>> -4) * (NaN >= 3);
                                c = 1 + c, (this !== NaN) / (-2 == "a") >= (NaN >= "b", 
                                [ , 0 ].length === 2, -2);
                            }
                        }
                    }
                }
            }
        }
    }():
    switch (("function" !== "number") < ("number" ^ [ , 0 ][1]) >= ("bar" / -0 !== (22 !== -4))) {
      case typeof foo_1 !== "string":
        break;

      case (c = c + 1) + (undefined && undefined.undefined):
        break;

      case {
            "": a++ + (1 === 1 ? a : b)
        }.value:
        break;

      case --b + (24..toString() in [ undefined && typeof undefined.done == "function" && --_calls_ >= 0 && undefined.done(22, {
            static: a++ + [ (c = 1 + c, (-3 <= -4) * ("bar" << null) >>> ([ , 0 ].length === 2 !== 0) / (-5 ^ 25)), (c = 1 + c, 
            delete ((false ?? -1) % ("a" === "b"))), (c = 1 + c, ((undefined && (undefined.foo += -0 ?? 38..toString())) & (-3 ^ 23..toString())) % (-4 <= 4 ^ -4 >>> "c")), (c = 1 + c, 
            ((undefined && (undefined[c = 1 + c, ("number" == 38..toString()) << (NaN == -1) | 23..toString() + Infinity === (c = c + 1, 
            22)] = -3 >> 3)) != Infinity > "number") > ([ , 0 ][1] * "a" | "bar" % "a")), (c = 1 + c, 
            void ([] % -4) >> ((Infinity && true) >>> (undefined && ({
                static: undefined.b
            } = {
                static: 0 + {}
            })))) ][typeof await == "boolean"],
            3: (c = c + 1) + (undefined && (undefined[(/[a2][^e]+$/ && null) >> 4 - NaN ?? (undefined && (undefined.foo = 1 / undefined)) == ([ 3n ][0] > 2 != 0)] += (("bar" || NaN) && (-5 && undefined)) | (-0 ^ "undefined") < (22 ^ Infinity))),
            [--b + /[abc4]/.test(((c = c + 1) + a++ || b || 5).toString())]: --b + [ (c = 1 + c, 
            "undefined" !== 22, false === -5, ("function" == -2) + ("function" | -1)) ][undefined && undefined[c = 1 + c, 
            ([] <= [ , 0 ][1]) << (-2 >>> 24..toString()) || "c" ^ {} ^ "" >> 25]]
        }, --b + (undefined && typeof undefined.in == "function" && --_calls_ >= 0 && undefined.in(...[], --b + {
            NaN: (c = 1 + c, undefined && (undefined[(c = c + 1) + ((38..toString() !== []) + (1 >>> {}) !== (("c" || -4) & (undefined && (undefined.next = "" !== {}))))] &&= (1 - null, 
            3 * -1) === "a" >>> -4 > (38..toString() && 22)))
        }))) ]):
        switch (++a) {
          case false in {
                c: [].undefined,
                next: --b + -a,
                in: undefined += --b + (-4 in {
                    length: --b + /[abc4]/.test(((c = 1 + c, ({} <= Infinity | 2 < 23..toString()) ** (void 0 % (undefined >>>= ("", 
                    5)))) || b || 5).toString())
                })
            }:
            "c";
            ;
            --b + {
                value: "function",
                c: new function b_1(b, foo) {
                    this[-0 % -1 ^ undefined >>> 0 | (Number(0xdeadn << 16n | 0xbeefn), 
                    1) != (Infinity == 2)] = (5 ?? this) >> (2 | 5);
                    this[--b + (c = 1 + c, (0 ?? [ , 0 ][1]) << ("object" < "function") && !(0 > "bar"))] = 23..toString() === 4 ^ "foo" - "c";
                    this.b = (foo && (foo.async += 1 !== "a")) >>> (/[a2][^e]+$/ ?? -5);
                    c = 1 + c, (1 - -3 || {} - undefined) === (("", /[a2][^e]+$/) === -3 > -0);
                    c = 1 + c, (b && (b.foo += (b_1 && (b_1.in ^= 0 | -3)) * (-3 - "b"))) / ("number" !== 1 === ("a" !== ([ , 0 ].length === 2)));
                    c = 1 + c, (-0 <= NaN, "undefined" >> "a") ^ ("number" >> []) % (-1 === -1);
                    c = 1 + c, (25 < 0) << (c = c + 1, this) && [] !== /[a2][^e]+$/ != (b_1 && (b_1[c = 1 + c, 
                    (4 - "" & (foo && (foo.async = "c" > "foo"))) >>> ("" << 1) / (4 << [ , 0 ][1])] = -3 & this));
                    c = 1 + c, undefined && (undefined.set &= ("object" || -2 || [ , 0 ][1] * "undefined") > true << -5 >> ("a" && "undefined"));
                }(),
                value: 0 === 1 ? a : b,
                1.5: undefined && typeof undefined.var == "function" && --_calls_ >= 0 && undefined.var()
            }[--b + !a];
            break;

          default:
          case --b + (Infinity / "undefined" % (-4 - undefined) || (23..toString() - 24..toString()) / (2 >= "b")):
            (function b_1() {
                {
                    var expr65 = b_1 && b_1.Infinity;
                    for (let key65 in expr65) {
                        c = 1 + c;
                        let a_2 = expr65[key65];
                        {
                            var brake66 = 5;
                            L55383: do {
                                c = 1 + c, (38..toString() | "function") == (b_1 && (b_1.NaN = "object" < "b")) && (3 != [ , 0 ][1]) - void /[a2][^e]+$/;
                            } while ((c = 1 + c, c = c + 1, -2 - 38..toString() | null == -3) && --brake66 > 0);
                        }
                    }
                }
            })();
            break;

          case a++ + typeof undefined:
            {
                var brake68 = 5;
                do {
                } while (undefined && typeof undefined.in == "function" && --_calls_ >= 0 && (a++, 
                undefined.in)() && --brake68 > 0);
            }
            break;
        }
        {
            c = c + 1;
            L55384: for (var brake72 = 5; undefined && brake72 > 0; --brake72) {
                a++ + {
                    value: undefined && typeof undefined.null == "function" && --_calls_ >= 0 && undefined.null(..."" + undefined)
                }[a++ + (undefined && undefined[c = 1 + c, ((c = c + 1, "b") > ("object" <= true)) - ((undefined ^ NaN) >> (-3 == ([ , 0 ].length === 2)))] || a || 3).toString()];
            }
        }
        break;
    }
    {
        var brake74 = 5;
        L55385: while ((b = a) && --brake74 > 0) {
            for (var brake75 = 5; [ a++ + (null in [ typeof undefined == "function" && --_calls_ >= 0 && undefined(), (c = c + 1) + /[abc4]/g.exec((undefined && typeof undefined.async == "function" && --_calls_ >= 0 && undefined.async([ , 0 ].length === 2, -3) || b || 5).toString()), --b + delete ((("number" != 1) < (NaN === null)) >> ([ , 0 ][1] || 3) * ("c" && "c")), (undefined && typeof undefined.b == "function" && --_calls_ >= 0 && undefined.b((c = 1 + c, 
            (undefined && (undefined.Infinity += (-1) ** "a" <= (0 ^ Infinity))) / ((c = c + 1, 
            -3) % (/[a2][^e]+$/ >>> ([ , 0 ].length === 2))))) || 3).toString()[/[abc4]/.test((undefined && typeof undefined.set == "function" && --_calls_ >= 0 && undefined.set(-2, (c = 1 + c, 
            NaN - 23..toString() <= (undefined && (undefined[c = 1 + c, ((true && true) ?? 1 < 23..toString()) + (2 == "c" || Infinity >= -2)] = 25 ^ [ , 0 ].length === 2)) <= (undefined && (undefined[(c = c + 1) + ++a] += (4 == true) / ("b" ^ 22))))) || b || 5).toString())] ]), a++ + (a++ + (undefined && undefined.async) || 5).toString()[undefined && undefined[(c = c + 1) + void ((undefined && (undefined[a++ + this] += [ , 0 ][1] & 24..toString() || [ , 0 ][1] === -2)) / ((undefined && (undefined.null /= ([], 
            "b"))) | 1 & 4))]] ].undefined && brake75 > 0; --brake75) {
                var bar_2 = --b + ((-0 % "undefined" & -2 * false) << ((0 & 4) != (38..toString() && "foo")));
            }
        }
    }
    c = c + 1;
    break;

  case --b + (a++ + (undefined && undefined[--b + (a++ + (undefined && typeof undefined.done == "function" && --_calls_ >= 0 && undefined.done(/[a2][^e]+$/)) ? a++ + (undefined += "") : --b + (bar_2 && bar_2[--b + /[abc4]/g.exec((--b + undefined || b || 5).toString())]))])):
    {
        var undefined_2 = function f3(bar_2, let_1, async_1) {
            function f4() {
                function f5(undefined_1, undefined_1, let_1_1) {
                    c = 1 + c, [ , 0 ][1] * "bar" ^ "object" > -5 ^ ("" ^ "c") << !1;
                }
                var a_1 = f5();
                function f6() {
                }
                var async_1_2 = f6(24..toString());
            }
            var arguments_1 = f4();
            function f7([ arguments_2, foo, undefined_1 ]) {
                function f8(undefined_1, yield, undefined_1_1) {}
                var yield_1 = f8("function", (c = 1 + c, (-2 | -1) + (/[a2][^e]+$/ & "foo") === NaN > -2 > (-1 || -2)));
                function f9(a_1) {
                }
                var foo = f9(-1);
                function f10(undefined_1_2) {
                    c = 1 + c, (23..toString() !== 5, 23..toString() < 1) == (2 <= this ^ this >> 4);
                    c = 1 + c, void 22 & ([ , 0 ].length === 2) << 3, -(-0 ^ 4);
                    c = 1 + c, (+4 & "a" == false) * ("c" !== 3 != (false == ([ , 0 ].length === 2)));
                }
                var bar_1 = f10(null);
            }
            var c_1 = f7([], [ , 0 ][1], a++ + (typeof f2 == "function" && --_calls_ >= 0 && f2(-4, [ , 0 ][1]) || 1).toString()[--a]);
            function f11() {
                try {
                    try {
                        c = 1 + c, ("undefined" ^ false | ("a" && "undefined")) >>> (-5 > 5) * ("a" & -4);
                    } catch (a) {
                    } finally {
                    }
                } catch (Infinity_2) {
                    c = 1 + c, undefined = (import.meta << 3, 4 === 3) || undefined % 22 ^ "foo" >> "function";
                    c = 1 + c, !(4 >> 24..toString()) <= ("c" > true) * (NaN > -2);
                } finally {
                    c = 1 + c, 23..toString() % "" + (undefined && -4) == ("number" >>> 25, 
                    -1 & this);
                    c = 1 + c, (bar_2 && (bar_2[c = 1 + c, (async_1 && (async_1[(c = c + 1) + [ (c = 1 + c, 
                    ((bar_2 && (bar_2.a += "function" & "bar")) | null === -4) >= ("b" == 25 !== 3 + 5)), (c = 1 + c, 
                    (2, -2) + (0 >> "bar") || ([ , 0 ].length === 2 | "a") ^ ("foo" ^ 22)), (c = 1 + c, 
                    [] * 5 >= (1 <= 38..toString()) & (-5 !== "object") / (2 + false)) ]] = [] - 22 >>> (undefined || Infinity))) != 38..toString() - "undefined" >> ("object" ^ "")] += -5 * {}) && (4 && 22)) !== false < ([ , 0 ].length === 2) <= (4, 
                    "");
                }
            }
            var b = f11(-b, --b + (b = a), "object");
        }(-2, (c = c + 1) + typeof bar_2, --b + (--b || a || 3).toString());
    }
    break;
}

var b_1;

(c = c + 1) + ((undefined_2 && (undefined_2.undefined += [ , 0 ][1] === ([ , 0 ].length === 2))) >>> ("bar" & 0) <= ("c" & 1 ?? ("b" ?? this)));

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

switch (a++ + a) {
  case --b + ("unknown" != typeof foo_2):
    for (var brake2 = 5; "boolean" != typeof bar_1 && 0 < brake2; --brake2) {
        for (var brake3 = 5; --b + (a && a.get) && 0 < brake3; --brake3) {
            for (var brake4 = 5; a && "function" == typeof a.Infinity && 0 <= --_calls_ && a.Infinity("function" == typeof a && 0 <= --_calls_ && a(b + 1 - .3), ..."" + a) && 0 < --brake4; ) {
                var key5, expr5 = (c += 1) + ((c += 1) + ((a += 0) >> !1));
                for (key5 in expr5) {
                    var c = 1 + c, b_2 = expr5[key5], brake6 = 5;
                    do {
                        var foo_1 = {
                            "-2": (c += 1) + void 0
                        }[--b + (b = a)], b_2 = "function" == typeof f0 && 0 <= --_calls_ && f0();
                    } while (a++ + ("crap" == typeof foo) && 0 < --brake6);
                }
            }
        }
    }
    for (var brake8 = 5; --b, "function" == typeof a && 0 <= --_calls_ && a(this), 
    a += --b + [], 0 < brake8; --brake8) {
        "function" == typeof ++a && 0 <= --_calls_ && a((c += 1) + a, /[a2][^e]+$/);
    }
    var brake11, brake10 = 5;

  default:
    for (var brake13 = 5; --b + (3 in [ a++ + (--b + [ --b + (a && a[--b + "undefined"]), (c += 1) + ("b" in {}) ]) ]) && 0 < brake13; --brake13) {
        var undefined = function(n, n) {
            for (var e = 5; c += 1, (n >>= n && n.null) && 0 < --e; ) {}
            var a = 5;
            do {
                try {
                    c = 1 + (c + 1), c += 1, n && (n[c = 1 + c, n && (n.NaN |= 1), 
                    0 < ({
                        [(c = 1 + c, c += 1, NaN)]: (-4).next
                    } = {
                        async: !1
                    })] += 1 / 0);
                } catch (n) {
                    return;
                }
            } while (--b + (n && "function" == typeof n.foo && 0 <= --_calls_ && n.foo(/[a2][^e]+$/)) && 0 < --a);
        }();
    }
    a++, --b + (b + 1 - .3) ? (--b, (a++ + void 0 || a || 3).toString()) : undefined = NaN;

  case (c += 1) + +function n() {
        var e = void function() {
            try {
                c = 1 + c;
            } catch (n) {
                c = 1 + c;
            }
        }((c = c + 1 + 1, --b)), d = 5;
        do {
            return ("" + (--b + void function() {
                for (var n = 5; !0 in {
                    in: (c = 1 + c, !0 & (c += 1, !1))
                } && 0 < --n; ) {}
            }() || 6))[--b + "function"];
        } while ((c += 1) + ((2 === [ , 0 ].length) in [ e ]) && 0 < --d);
        try {
            c += 1;
        } finally {
            if ((c += 1) + b++ ? --b : a++ + a--) {
                return a++ + ("" + (a++ + ("function" == typeof e && 0 <= --_calls_ && e((c = 1 + c, 
                !1 & (n && ([ n[c = 1 + c, e = ((n && (n.NaN <<= !1)) << 4 % (2 === [ , 0 ].length)) * ((3 == undefined) <= !1)] ] = [ (undefined += 0) + !1 ]))))) || 0))["function" == typeof undefined && 0 <= --_calls_ && undefined()];
            }
            c += 1;
            for (var f = 5; -0 <= (-5 ^ null * (2 === [ , 0 ].length)) && 0 < --f; ) {
                switch (c = 1 + c, !1) {
                  case c = 1 + c, c = 1 + c, (e && (e[--b + ("function" == typeof f3 && 0 <= --_calls_ && f3())] &= !1)) + 23:
                  case c = 1 + c, "undefined" * ("" + (0xdeadn << 16n | 0xbeefn)) % !1 < 24:
                }
            }
        }
        for (var i = 5; a++ + (e && e.foo) && 0 < i; --i) {
            for (var e = a++ + ("string" == typeof a_2_1), t = 5; (c += 1) + typeof a-- && 0 < --t; ) {
                var u, o = --b + a--;
                for (u in o) {
                    c = 1 + c;
                    for (var r = o[u], l = 5; {
                        [23]: (c = 1 + (c = 1 + c), (2 === [ , 0 ].length) << null & NaN || 0),
                        "-2": (c = 1 + c, !1)
                    }[a++ + (n && "function" == typeof n.NaN && 0 <= --_calls_ && n.NaN((c = 1 + c, 
                    n && (n.next += 0 | (r && (r[--b + --b] = !0))))))] && 0 < l; --l) {
                        c = 1 + (c = 1 + c);
                    }
                }
            }
        }
    }():
    switch (!1) {
      case "string" != typeof foo_1:
      case (c += 1) + (undefined && undefined.undefined):
      case {
            "": a++ + a
        }.value:
        break;

      case --b + ("24" in [ undefined && "function" == typeof undefined.done && 0 <= --_calls_ && undefined.done(22, {
            static: a++ + [ (c = 1 + c, 0 >>> (2 === [ , 0 ].length !== 0) / -30), !0, (c = 1 + (1 + c), 
            (-22 & (undefined && (undefined.foo += -0))) % -3), (c = 1 + c, 0 < (0 != (undefined && (undefined[c = 1 + c, 
            0 | "23" + 1 / 0 === (c += 1, 22)] = -1)))), (c = 1 + c, void 0 >> (!0 >>> (undefined && ({
                static: undefined.b
            } = {
                static: 0 + {}
            })))) ]["boolean" == typeof await],
            3: (c += 1) + (undefined && (undefined[0] += !0 | undefined)),
            [--b + /[abc4]/.test(((c += 1) + a++ || b || 5).toString())]: --b + [ (c = 1 + c, 
            -1) ][undefined && undefined[c = 1 + c, !0 << 255]]
        }, --b + (undefined && "function" == typeof undefined.in && 0 <= --_calls_ && undefined.in(--b + {
            NaN: (c = 1 + c, undefined && (undefined[(c += 1) + (2 != ("c" & (undefined && (undefined.next = !0))))] &&= !1))
        }))) ]):
        switch (++a) {
          case !1 in {
                c: [].undefined,
                next: --b - a,
                in: undefined += --b + (-4 in {
                    length: --b + /[abc4]/.test((c = 1 + c, (1 ** (void 0 % (undefined >>>= 5)) || b || 5).toString()))
                })
            }:
            --b, new function n(e, a) {
                this[-0 ^ undefined >>> 0 | !0] = 0, this[--e + (c = 1 + c, 0)] = 0, 
                this.b = (a && (a.async += !0)) >>> /[a2][^e]+$/, c = 1 + (c = 1 + c), 
                e && (e.foo += NaN * (n && (n.in ^= -3))), c = 1 + (c = 1 + c), 
                !1 << (c += 1, this) && n && (n[c = 1 + c, (4 & (a && (a.async = !1))) >>> 0] = -3 & this), 
                c = 1 + c, undefined && (undefined.set &= !1);
            }(), undefined && "function" == typeof undefined.var && 0 <= --_calls_ && undefined.var(), 
            --b;
            break;

          default:
          case --b + (NaN % (-4 - undefined) || -1 / 0):
            !function n() {
                var e, a = n && n.Infinity;
                for (e in a) {
                    c = 1 + c, a[e];
                    for (var d = 5; c = 1 + c, n && (n.NaN = !1), c = 1 + c, c += 1, 
                    0 < --d; ) {}
                }
            }();
            break;

          case a++ + typeof undefined:
            for (var brake68 = 5; undefined && "function" == typeof undefined.in && 0 <= --_calls_ && (a++, 
            undefined.in)() && 0 < --brake68; ) {}
        }
        c += 1;
        for (var brake72 = 5; undefined && 0 < brake72; --brake72) {
            a++, undefined && "function" == typeof undefined.null && 0 <= --_calls_ && undefined.null(..."" + undefined), 
            a++, (undefined && undefined[c = 1 + c, c += 1, !1 - ((NaN ^ undefined) >> (-3 == (2 === [ , 0 ].length)))] || a || 3).toString();
        }
    }
    for (var brake74 = 5; (b = a) && 0 < --brake74; ) {
        for (var brake75 = 5; [ a++ + (null in [ "function" == typeof undefined && 0 <= --_calls_ && undefined(), (c += 1) + /[abc4]/g.exec((undefined && "function" == typeof undefined.async && 0 <= --_calls_ && undefined.async(2 === [ , 0 ].length, -3) || b || 5).toString()), --b + !0, (undefined && "function" == typeof undefined.b && 0 <= --_calls_ && undefined.b((c = 1 + c, 
        (undefined && (undefined.Infinity += !1)) / (c += 1, -3 % (/[a2][^e]+$/ >>> (2 === [ , 0 ].length))))) || 3).toString()[/[abc4]/.test((undefined && "function" == typeof undefined.set && 0 <= --_calls_ && undefined.set(-2, (c = 1 + c, 
        NaN <= (undefined && (undefined[c = 1 + c, 2] = 25 ^ 2 === [ , 0 ].length)) <= (undefined && (undefined[(c += 1) + ++a] += 0)))) || b || 5).toString())] ]), a++ + ("" + (a++ + (undefined && undefined.async) || 5))[undefined && undefined[(c += 1) + (undefined && (undefined[a++ + this] += !1), 
        void (undefined && (undefined.null /= "b")))]] ].undefined && 0 < brake75; --brake75) {
            var bar_2 = --b;
        }
    }
    c += 1;
    break;

  case --b + (a++ + (undefined && undefined[--b + (a++ + (undefined && "function" == typeof undefined.done && 0 <= --_calls_ && undefined.done(/[a2][^e]+$/)) ? a++ + (undefined += "") : --b + (bar_2 && bar_2[--b + /[abc4]/g.exec((--b + undefined || b || 5).toString())]))])):
    var undefined_2 = function(n) {
        c = 1 + c, a++, ("function" == typeof f2 && 0 <= --_calls_ && f2(-4, 0) || 1).toString()[--a], 
        c = 1 + (1 + (1 + (1 + c)));
        try {
            try {
                c = 1 + c;
            } catch (n) {}
        } catch (n) {
            c = 1 + c, import.meta, undefined = undefined % 22 ^ 0, c = 1 + c;
        } finally {
            (-2)[c = 1 + (1 + (1 + c)), 0 != (n && (n[(c += 1) + [ (c = 1 + c, !0 <= (!1 | ((-2).a += 0))), -2, (c = 1 + (1 + c), 
            0) ]] = -22 >>> (undefined || 1 / 0)))] += NaN;
        }
    }((c += 1, --b + (--b || a || 3).toString()));
}

c += 1, undefined_2 && (undefined_2.undefined += 0 === (2 === [ , 0 ].length)), 
console.log(null, a, b, c, 1 / 0, NaN, undefined);
original result:
null 123 123 88 Infinity NaN undefined

uglified result:
null 123 123 87 Infinity NaN undefined
// reduced test case (output will differ)

// (beautified)
(function f1(yield_1_2) {
    (function f2() {
        yield_1_2.undefined;
    })(yield_1_2?.[0]);
})();
// output: TypeError: Cannot read properties of undefined (reading 'undefined')
// minify: 
// options: {
//   "compress": {
//     "passes": 1000000,
//     "sequences": 1000000,
//     "unsafe": true,
//     "unsafe_Function": true,
//     "unsafe_math": true,
//     "unsafe_proto": true,
//     "unsafe_regexp": true
//   },
//   "module": false,
//   "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
  },
  "module": false,
  "output": {
    "v8": true
  }
}

Suspicious compress options:
  evaluate
  optional_chains
  passes
  pure_getters
  reduce_vars
  side_effects
  unused

Suspicious options:
  rename
@alexlamsl alexlamsl added the bug label Jun 20, 2024
alexlamsl added a commit to alexlamsl/UglifyJS that referenced this issue Jun 20, 2024
alexlamsl added a commit to alexlamsl/UglifyJS that referenced this issue Jun 20, 2024
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