Uglifyjs: ufuzz failure

Created on 10 May 2020  路  10Comments  路  Source: mishoo/UglifyJS

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

{
    var expr1 = (c = c + 1) + +b;
    for (var key1 in expr1) {
        var a_1 = {
            Infinity: [ --b + +(([] || [ , 0 ][1]) * ([] && -5) <= ~(false - "undefined")), !function() {
                {
                    var bar_1 = function f0() {
                        c = 1 + c, (c = c + 1, -5 / "bar") !== void (/[a2][^e]+$/ % 25);
                        c = 1 + c, ((-0 ^ -1) === ([ , 0 ].length === 2 !== 25)) * ((3 | "") >= (a_1 && (a_1[c = 1 + c, 
                        c_2 += (([ , 0 ][1] && "object") === 38..toString() < -2) - (5 !== 38..toString()) * (c = c + 1, 
                        "number")] |= "foo" == "bar")));
                    }(-5, Infinity, 22);
                }
                try {
                    {
                        var expr7 = a++ + (a_1 && (a_1[a++ + (typeof Math_1 == "unknown")] = (a_1 && (a_1.Infinity += NaN / "c")) * (a_1 += {} !== undefined) << ("function" > 3 != (38..toString() === 23..toString()))));
                        for (var key7 in expr7) {
                            {
                                var expr8 = (c = 1 + c, (c_2 = true >> 4 >> 24..toString() / -0) && (-5 >= 0) << (-0 < ""));
                                for (var key8 in expr8) {
                                    c = 1 + c;
                                    var parseInt_2 = expr8[key8];
                                    c = 1 + c, (-5 < "foo") + /[a2][^e]+$/ * 5 && (bar_1 && (bar_1[c = 1 + c, bar_1 && (bar_1[typeof parseInt_2 == "function" && --_calls_ >= 0 && parseInt_2("number", /[a2][^e]+$/, (c = 1 + c, 
                                    ("b" > "a" | 3 + "object") % (c = c + 1, NaN <= "c")))] = -24..toString() + ("object" < "object") !== (25 !== [ , 0 ][1] !== ("a" === [ , 0 ][1])))] <<= 22 % null)) % (1 % "bar");
                                }
                            }
                        }
                    }
                } catch (a_1_1) {
                }
                switch (1 === 1 ? a : b) {
                  case (c = c + 1) + a++:
                    var c_2_2 = (c = 1 + c, ("bar" > 1 ^ (bar_1 && (bar_1[c = 1 + c, "undefined" >>> Infinity > (null < "function") & 5 % -4 == (22 === 38..toString())] = 22 == "a"))) !== (22 >>> -0) / (c_2 += -2 && 5)), c_2_2_2 = (c = 1 + c, 
                    void (NaN / null) || null < 4 ^ (-4 || NaN));
                    c = c + 1;
                    break;

                  case c_2_2_2:
                    break;

                  default:
                    ;
                    {
                        var brake16 = 5;
                        L22139: while ((c = 1 + c, (parseInt_2 && (parseInt_2.NaN += NaN || 25)) << -undefined | (this + "function" | (c_2_2 = "foo" > undefined))) && --brake16 > 0) {
                            c = 1 + c, (-4 === Infinity ^ Infinity >>> ([ , 0 ].length === 2)) !== [ , 0 ][1] < -2 > (23..toString() || 3);
                        }
                    }

                  case --b + (("c" !== "c") % (4 <= "object") || "number" % "bar" - (24..toString() < "a")):
                    break;
                }
            }(), c_2, --b + b++ ],
            3: (c = c + 1) + (b <<= a)
        }.foo, c_2 = +function() {
            {
                var brake18 = 5;
                do {
                    {
                        var parseInt_2 = function f1(parseInt, c_2, Infinity) {
                            function f2(parseInt, a_2) {
                            }
                            var Math_2 = f2((c = 1 + c, (true == 2 ^ false == -5) % (c_2 && (c_2.foo &= 5 != undefined ^ {} & 23..toString()))));
                            function f3() {
                                c = 1 + c, (22 | 22) << (3 ^ 24..toString()) ^ (25 / 25 ^ NaN << "b");
                                c = 1 + c, (([ , 0 ].length === 2) << "undefined" & "a" / 5) >> (c_2 && (c_2[a++ + {
                                    length: (c = 1 + c, (4 && "foo") <= 0 >>> 5 != ((Math_2 += {} >>> false) & -3 > NaN)),
                                    get a() {
                                        c = 1 + c, ([ , 0 ][1] & "foo") == (-1 != "object") | (3 > [], [] % "object");
                                    },
                                    undefined: (c = 1 + c, (c = c + 1, Infinity) / (Infinity ^ 1) && (c = c + 1, "c" & [ , 0 ][1])),
                                    a: (c = 1 + c, (c = c + 1, -4) >> (true === "c") & 4 % false < (38..toString() < -2)),
                                    "-2": (c = 1 + c, a_1 && (a_1.c = ((c_2 && (c_2[c = 1 + c, (("undefined" != this) < (1 !== /[a2][^e]+$/)) << (([ , 0 ][1] & /[a2][^e]+$/) >> ("number" | -5))] = "object" !== -2)) === (false == -4)) > (false % true === (false | "undefined"))))
                                }[c = 1 + c, delete ("b" != -4) >= (-2 >> "bar") * (null, [])]] /= -0 ^ 23..toString() | void 23..toString()));
                            }
                            var foo_1 = f3((c = 1 + c, (24..toString() != "foo") / ("" >> false) ^ (c_2 && (c_2[!a] += (-5 < "function", 
                            [] >= "c")))));
                        }([ , typeof arguments_2, -1 ][!((-4 | {}) > ~[ , 0 ][1] & (22 && {}) * (-1 >>> -4))], --b + (parseInt_2 && parseInt_2[(c = c + 1) + -3]), {});
                    }
                } while (a++ + [ typeof f5 == "function" && --_calls_ >= 0 && f5([ , 0 ].length === 2, a++ + (c_2 += a--), a++ + !b), (c = c + 1) + {
                    "-2": --b + (b = a),
                    null: (c = c + 1) + (typeof parseInt !== "crap"),
                    set foo(undefined) {
                        c = c + 1;
                        this.Infinity = ("object" + 25 !== (c = c + 1, -4)) % (("" >= {}) >> (c_2 && (c_2.a = 4 && this)));
                    }
                }, a++ + (a_1 && typeof a_1.b == "function" && --_calls_ >= 0 && a_1.b(--b + /[abc4]/.test((/[abc4]/g.exec(((c = 1 + c, 
                (a_1 && (a_1.var += void 22 && (c = c + 1, -3))) >>> (2 - 5 !== 23..toString() >>> undefined)) || b || 5).toString()) || b || 5).toString()))), a++ + (b = a), [ --b + (typeof f3 == "function" && --_calls_ >= 0 && f3("object", "b", "object")), (c = c + 1, 
                1 / 2) ^ [ , 0 ][1] >= 2 >= [] >>> 4, (c = c + 1) + (parseInt_2 && parseInt_2[(c = 1 + c, 
                ("bar" <= -1) >> ("bar" || 2) >> ("b" > Infinity | -1 - [])) ? (c = 1 + c, (23..toString() || "") % ([] && [ , 0 ].length === 2) ^ (parseInt_2 && (parseInt_2[c = 1 + c, 
                c_2 = ([ , 0 ].length === 2 !== "b") * ("object" - "undefined") != (parseInt_2 && (parseInt_2[c = 1 + c, 
                null || "bar", undefined == "bar", 2 >> 1 >= (Infinity && 3)] = "function" >> {})) - ("number" < 1)] += 25 != -5)) + ("" <= 1)) : (c = 1 + c, 
                (-5 ^ [ , 0 ][1]) >> "c" * "" ^ ([] && 1 && (c_2 += false == "object")))]), (c = c + 1) + !function b() {
                    c = 1 + c, -([] !== 22 ^ this - undefined);
                }(), (c = c + 1) + -a ] ][--b + typeof {
                    null: (Infinity === NaN) >>> ("bar" & 23..toString()) << (![] << Infinity / 22),
                    a: /[abc4]/g.exec(((0 === 1 ? a : b) || b || 5).toString()),
                    set in(b_2) {
                        c = c + 1;
                        this.NaN *= ("object" + 38..toString() != -5 / 4) >= {} + -4 - ("number" < -5);
                    }
                }.var] && --brake18 > 0);
            }
        }();
    }
}

try {
    {
        var brake27 = 5;
        while (typeof f0 == "function" && --_calls_ >= 0 && f0() && --brake27 > 0) {
            var a_2 = function b_1(NaN_2, b, b_1) {
                --b + (a_1 && a_1.null);
                L22140: {
                    {
                        var brake31 = 5;
                        L22141: while (delete a && --brake31 > 0) {
                            switch (--b + [ (c = 1 + c, NaN_2 |= ("a" || 38..toString()) === "b" << undefined && ("function" < {}) / ("bar" >> -2)), (c = 1 + c, 
                            a_1 += (5 || 1) != ([] == "foo") !== (-3 !== "bar") + (this && 24..toString())) ]) {
                              case (c = c + 1) + 25:
                                {
                                    var brake33 = 5;
                                    while ((c = 1 + c, ("b" != "c") >>> (Infinity ^ 23..toString()) > (c = c + 1, c_2 && (c_2.c &= "b" - false))) && --brake33 > 0) {
                                        c = 1 + c, (NaN_2 && (NaN_2[(c = c + 1) + (b_1 && b_1.foo)] = delete NaN + ("undefined" & "function"))) & ("function" !== true ^ -4 % NaN);
                                    }
                                }

                              case typeof f2 == "function" && --_calls_ >= 0 && f2():
                                switch (c = 1 + c, ("foo" != []) / ("foo" ^ "a") + (-2 * 38..toString() && "number" + "b")) {
                                  case c = 1 + c, "b" << undefined > "function" >>> "bar" !== (NaN_2 = /[a2][^e]+$/ >= -5) >> ("object" >= ""):
                                    ;
                                    break;

                                  case c = 1 + c, ((NaN_2 && (NaN_2.c |= "undefined" + 1)) & ("object" | "c")) < delete (c_2 && (c_2[c = 1 + c, 
                                    4 / "object" + (23..toString() >> 25) | ("" && true) % (c_2 && (c_2.null += "b" / "bar"))] += "c" ^ [])):
                                    ;
                                    break;

                                  case c = 1 + c, c_2 && (c_2[(c = c + 1) + (typeof f0 == "function" && --_calls_ >= 0 && f0(false, undefined))] = ~(c = c + 1, 
                                    this) & (38..toString() || Infinity) > Infinity * 1):
                                    ;
                                    break;

                                  case c = 1 + c, c_2 && (c_2.c += ((38..toString() && [ , 0 ][1]) == ("function" ^ 22)) >> (-2 >>> 23..toString() !== "bar" >> 3)):
                                    ;
                                    break;
                                }
                                {
                                    var brake36 = 5;
                                    do {
                                        c = 1 + c, (/[a2][^e]+$/ <= 1) << (22 ^ -1) >= (c_2 && (c_2[--b + ((-3 > true) >>> ([] !== 3)) / (-0 % ([ , 0 ].length === 2) ^ -3 == "c")] += "foo" >= {} && ([ , 0 ][1] || 38..toString())));
                                    } while ((c = 1 + c, a_1 && (a_1[b += a] += (("a" && -0) ^ (1 && "number")) == (-0 / 4, 
                                    [] >= []))) && --brake36 > 0);
                                }
                                break;

                              case (c = c + 1) + (NaN_2 && NaN_2.c):
                                if (c = 1 + c, (b_1 = -3 / 0 ^ this & "b") + (24..toString() << "number" >> null + -2)) {
                                    c = 1 + c, (24..toString() <= /[a2][^e]+$/ === (false !== null)) < (-2 < 24..toString()) * (25 === 1);
                                }
                                break;

                              case (/[abc4]/.test(((c = 1 + c, NaN_2 += -3 ^ "a" || (NaN_2 = "bar" || -5) || (undefined, 
                                1) >= (38..toString() !== "function")) || b || 5).toString()) || 5).toString()[b--]:
                                c = 1 + c, ("a" - true != ({} !== undefined)) > (undefined !== -1 & -1 + -2);
                                break;
                            }
                        }
                    }
                    0 === 1 ? a : b;
                }
            }(+b);
        }
    }
} catch (Infinity_2) {
    {}
    L22142: {
        {
            var bar = function f4() {
                var b_1 = a++ + Infinity_2, a_2 = --b + (typeof a_1 == "function" && --_calls_ >= 0 && a_1([], ~a));
            }(-2, --b + Infinity_2, (c = c + 1) + (a_1 && a_1[a++ + !function() {
                {
                    var brake47 = 5;
                    do {
                        c = 1 + c, [ , 0 ][1] !== false !== this + -4 == (2 * -0 ^ 5 + null);
                    } while ((c = 1 + c, (c_2 && (c_2.a = "undefined" - [])) === ({} || this) != (true >= true) % (3 && "foo")) && --brake47 > 0);
                }
            }()]));
        }
        {
            var brake49 = 5;
            while (/[abc4]/.test(((c = c + 1) + true || b || 5).toString()) && --brake49 > 0) {
                var expr50 = 0 === 1 ? a : b;
                L22143: for (var key50 in expr50) {
                    c = 1 + c;
                    var Infinity = expr50[key50];
                    {
                        var brake51 = 5;
                        L22144: while (--b + ((c = c + 1) + /[abc4]/.test((--b + (typeof f6 == "function" && --_calls_ >= 0 && f6((c = 1 + c, 
                        ("object" < 4) * (-0 < ([ , 0 ].length === 2)) / (("foo" << undefined) * (22 ^ -4))))) || b || 5).toString()) || 5).toString()[a++ + a_1] && --brake51 > 0) {
                            /[abc4]/.test(((c = c + 1) + (typeof c_2 !== "function") || b || 5).toString());
                        }
                    }
                }
            }
        }
    }
} finally {
    var a_1 = {
        undefined: a++ + (a_2 && a_2.Infinity),
        in: 0 === 1 ? a : b
    }.b;
    try {
        if (a++) {
            var expr56 = a++ + (a++ + b-- || a || 3).toString();
            for (var key56 in expr56) {
                c = 1 + c;
                var foo = expr56[key56];
                var bar = 1 === 1 ? a : b;
            }
        }
    } finally {
        --b + (({} >>> undefined, "a" ^ 4) || (NaN >= 1) * (-4 > -0) || a || 3).toString();
    }
}

console.log(null, a, b, c, Infinity, NaN, undefined);
// !!! uglify failed !!!
Error: expressions must contain multiple elements
    at AST_Sequence._validate (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:1073:48)
    at AST_Sequence.validate (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:406:38)
    at AST_Assign.ctor.transform (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:439:22)
    at AST_Assign.ctor.transform (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:437:34)
    at eval (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3198:25)
    at doit (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:120:23)
    at List (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:145:52)
    at do_list (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3197:16)
    at eval (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3281:28)
    at AST_Sequence.eval [as transform] (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3318:13)
    at AST_Sequence.ctor.transform (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:437:34)
    at eval (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3269:49)
    at AST_VarDef.eval [as transform] (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3318:13)
    at AST_VarDef.ctor.transform (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:437:34)
    at eval (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3198:25)
    at doit (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:120:23)
    at List (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:145:52)
    at do_list (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3197:16)
    at eval (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3265:28)
    at AST_Var.eval [as transform] (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3318:13)
    at AST_Var.ctor.transform (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:437:34)
    at AST_Var.ctor.transform (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:437:34)
    at eval (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3214:31)
    at AST_Do.eval [as transform] (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3318:13)
    at AST_Do.ctor.transform (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:437:34)
    at eval (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3198:25)
    at doit (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:120:23)
    at List (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:145:52)
    at do_list (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3197:16)
    at eval (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3274:21)
    at AST_Function.eval [as transform] (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3318:13)
    at AST_Function.ctor.transform (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:437:34)
    at AST_Function.ctor.transform (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:437:34)
    at AST_Function.eval [as hoist_properties] (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:10309:14)
    at Compressor.before (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:5688:18)
    at AST_Function.eval [as transform] (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3315:31)
    at AST_Function.ctor.transform (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:437:34)
    at AST_Function.ctor.transform (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:437:34)
    at eval (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3277:43)
    at Compressor.before (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:5699:9)
    at AST_Call.eval [as transform] (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3315:31)
    at AST_Call.ctor.transform (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:437:34)
    at eval (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3291:43)
    at Compressor.before (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:5699:9)
    at AST_UnaryPrefix.eval [as transform] (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3315:31)
    at AST_UnaryPrefix.ctor.transform (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:437:34)
    at AST_UnaryPrefix.ctor.transform (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:437:34)
    at eval (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3269:49)
    at Compressor.before (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:5699:9)
    at AST_VarDef.eval [as transform] (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3315:31)
    at AST_VarDef.ctor.transform (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:437:34)
    at eval (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3198:25)
    at doit (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:120:23)
    at List (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:145:52)
    at do_list (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3197:16)
    at eval (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3265:28)
    at Compressor.before (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:5699:9)
    at AST_Var.eval [as transform] (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3315:31)
    at AST_Var.ctor.transform (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:437:34)
    at AST_Var.ctor.transform (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:437:34)
    at eval (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3230:31)
    at Compressor.before (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:5699:9)
    at AST_ForIn.eval [as transform] (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3315:31)
    at AST_ForIn.ctor.transform (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:437:34)
    at eval (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3198:25)
    at doit (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:120:23)
    at List (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:145:52)
    at do_list (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3197:16)
    at eval (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3211:21)
    at Compressor.before (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:5699:9)
    at AST_Toplevel.eval [as transform] (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:3315:31)
    at AST_Toplevel.ctor.transform (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:437:34)
    at AST_Toplevel.ctor.transform (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:437:34)
    at AST_Toplevel.ctor.transform (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:437:34)
    at Compressor.compress (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:5662:25)
    at Object.minify (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:15133:75)
    at d:\a\UglifyJS\UglifyJS\test\ufuzz\index.js:1165:32
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (d:\a\UglifyJS\UglifyJS\test\ufuzz\index.js:1161:51)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)



md5-5f3a7e810e03206d99c27c5d76254271



minify(options):
{
  "compress": {
    "keep_fargs": false,
    "passes": 1000000,
    "sequences": 1000000,
    "unsafe": true,
    "unsafe_Function": true,
    "unsafe_math": true,
    "unsafe_proto": true,
    "unsafe_regexp": true
  }
}
bug

Most helpful comment

Possibly − was too busy fixing the bugs :ghost:

All 10 comments

validate caught one...

Error: expressions must contain multiple elements
    at AST_Sequence._validate (eval at <anonymous> (d:\a\UglifyJS\UglifyJS\tools\node.js:18:1), <anonymous>:1073:48)

Did you have to reduce it yourself?

Caught two by now 馃懟

Did you have to reduce it yourself?

Not really, a quick hack of reduce.js made it work for this specific case.

Funny, when I reset to the commit before the fix I was unable to reduce it. By default, --reduce-test does not validate, right? Or do you need --validate to reduce?

That part is easy − just specify --validate on the command line 馃ぃ

The hacky part is by default --reduce-test bails out for any minify().error, which is trivial to workaround for this specific case.

In latest master can you successfully reduce a test case that fails validation using --reduce-test --validate without altering the code base?

You need to hack reduce.js slightly to avoid the immediate bail-out upon error as stated above.

Something like this:

--- a/test/reduce.js
+++ b/test/reduce.js
@@ -640,7 +640,10 @@ function run_code(result_cache, code, toplevel, timeout) {

 function producesDifferentResultWhenMinified(result_cache, code, minify_options, max_timeout) {
     var minified = U.minify(code, minify_options);
-    if (minified.error) return minified;
+    if (minified.error) return {
+        unminified_result: "PASS",
+        minified_result: minified.error,
+    };

     var toplevel = sandbox.has_toplevel(minify_options);
     var elapsed = Date.now();

I see. Can that be automated in some way to avoid such a manual hack each time?

Possibly − was too busy fixing the bugs :ghost:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Jimbly picture Jimbly  路  4Comments

buu700 picture buu700  路  5Comments

neverfox picture neverfox  路  4Comments

JoeUX picture JoeUX  路  3Comments

utdrmac picture utdrmac  路  4Comments