-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Closed
Description
-
Version:
v6.10.1-pre
(although this appears to affect multiple versions) -
Platform:
Linux fox 4.4.0-64-generic Update README.md #85-Ubuntu SMP Mon Feb 20 11:50:30 UTC 2017 x86_64 x86_64 x86_64
Test case:
var a = 0;
var i = 5;
do {
try {
} finally {
var NaN = --a;
}
} while (NaN && --i > 0)
console.log(a);
Test output:
$ node -v
v6.10.1-pre
$ uname -a
Linux fox 4.4.0-64-generic #85-Ubuntu SMP Mon Feb 20 11:50:30 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
$ cat s.js
var a = 0;
var i = 5;
do {
try {
} finally {
var NaN = --a;
}
} while (NaN && --i > 0)
console.log(a);
$ node s.js
-5
$ cat s.js | node
-1
$
From mishoo/UglifyJS#1695. I was fuzzing the minifier when I ran into this case. The output when ran from file is different as when ran when piping cli.
The code doesn't seem to do anything in particular that would cause this difference, although redefining NaN
could be its own reason.
Metadata
Metadata
Assignees
Labels
No labels