-
Type:
Bug
-
Status: Closed
-
Priority:
P3
-
Resolution: Fixed
-
Affects Version/s: 9, 11.0.3, 12, 14
-
Fix Version/s: None
-
Component/s: core-libs
-
Labels:
-
Subcomponent:
-
Introduced In Build:b99
-
Introduced In Version:
-
Resolved In Build:b06
-
CPU:generic
-
OS:generic
A DESCRIPTION OF THE PROBLEM :
#Testcase:
1. var NISLFuzzingFunc = function (placements) {
2. var p = undefined;
3. print(placements[p]);
4. };
5. var NISLParameter1 = [9814390527, 2];
6. NISLFuzzingFunc(NISLParameter1);
#Command:
./nashorn/jdk-12.0.2/bin/jjs --no-syntax-extensions=true --no-deprecation-warning=true testcase.js
#Output:
NaN
#Expected output:
undefined
#Description:
If the specified property can not be found, Nashorn should return "undefined" instead of "NaN". However, the output of Nashorn is "NaN" when running the testcase above.
Is this a bug of Nashorn? Looking forward to your reply.
#Testcase:
1. var NISLFuzzingFunc = function (placements) {
2. var p = undefined;
3. print(placements[p]);
4. };
5. var NISLParameter1 = [9814390527, 2];
6. NISLFuzzingFunc(NISLParameter1);
#Command:
./nashorn/jdk-12.0.2/bin/jjs --no-syntax-extensions=true --no-deprecation-warning=true testcase.js
#Output:
NaN
#Expected output:
undefined
#Description:
If the specified property can not be found, Nashorn should return "undefined" instead of "NaN". However, the output of Nashorn is "NaN" when running the testcase above.
Is this a bug of Nashorn? Looking forward to your reply.