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

Closed
alexlamsl opened this issue Oct 28, 2019 · 0 comments · Fixed by #3543
Closed

ufuzz failure #3542

alexlamsl opened this issue Oct 28, 2019 · 0 comments · Fixed by #3543
Labels

Comments

@alexlamsl
Copy link
Collaborator

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

var a_1 = --b + (typeof f1 == "function" && --_calls_ >= 0 && f1()), bar = a_1 && a_1[function b() {}];

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

--n, "function" == typeof f1 && f1(), e && function n() {};

console.log(null, 100, n, 0, Infinity, NaN, undefined);
original result:
null 100 9 0 Infinity NaN undefined

uglified result:
evalmachine.<anonymous>:1
(function(){var n=10;--n,"function"==typeof f1&&f1(),e&&function n(){};console.log(null,100,n,0,Infinity,NaN,undefined);})()
                                                     ^

ReferenceError: e is not defined
    at evalmachine.<anonymous>:1:54
    at evalmachine.<anonymous>:1:123
    at Script.runInContext (vm.js:127:20)
    at Object.runInContext (vm.js:290:6)
@alexlamsl alexlamsl added the bug label Oct 28, 2019
alexlamsl added a commit to alexlamsl/UglifyJS that referenced this issue Oct 28, 2019
alexlamsl added a commit to alexlamsl/UglifyJS that referenced this issue Oct 28, 2019
alexlamsl added a commit that referenced this issue Oct 28, 2019
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