[quickjs-devel] A possible issue about the abstract operation ToNumber

  • From: "Houyou Yao" <yaohouyou@xxxxxx>
  • To: "QuickJS" <quickjs-devel@xxxxxxxxxxxxx>
  • Date: Sat, 2 Nov 2019 09:36:13 +0800

Hi,
&nbsp; &nbsp; If I understand the ES standard correctly, I think the abstract 
operation ToNumber of QuickJS does not meet the ES standard.The details are as 
follows:




# Version: quickjs-2019-10-27


# Testcase:
var NISLFuzzingFunc = function() {
&nbsp; &nbsp; var tmp = Number("-");
&nbsp; &nbsp; print(tmp);
};
NISLFuzzingFunc();



# Output:
0


# Expected output:
NaN


# Reference of ECMAScript-262:
https://tc39.es/ecma262/#sec-tonumber




Best Regards,
Houyou Yao

Other related posts: