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

Closed
alexlamsl opened this issue Dec 4, 2019 · 0 comments · Fixed by #3627
Closed

ufuzz failure #3626

alexlamsl opened this issue Dec 4, 2019 · 0 comments · Fixed by #3627
Labels

Comments

@alexlamsl
Copy link
Collaborator

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

{}

if (-(a && (a[(a++ + [ (c = 1 + c, (-3 > 5, 1 ^ "foo") >>> (-2 | [ , 0 ][1] | this ^ 5)) ] || 8).toString()[a++]] = (2 / -2 && ([ , 0 ].length === 2) % "number") - (5 / [] ^ ("number" | -4))))) {
    if (a++ + (b = a)) {
        c = c + 1;
    }
}

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

-(a && (a[("" + (a++ + [ (c = 1 + c, 1 >>> (-2 | 5 ^ this)) ] || 8))[a++]] = NaN)) && a++ + a && (c += 1), 
console.log(null, a, a, c, 1 / 0, NaN, void 0);
original result:
null 102 10 1 Infinity NaN undefined

uglified result:
null 102 102 1 Infinity NaN undefined

minify(options):
{
  "compress": {
    "keep_fargs": false,
    "passes": 1000000,
    "sequences": 1000000,
    "unsafe": true,
    "unsafe_Function": true,
    "unsafe_math": true,
    "unsafe_proto": true,
    "unsafe_regexp": true
  }
}
@alexlamsl alexlamsl added the bug label Dec 4, 2019
alexlamsl added a commit to alexlamsl/UglifyJS that referenced this issue Dec 4, 2019
alexlamsl added a commit that referenced this issue Dec 4, 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