[quickjs-devel] Return a variable that does not exist without throwing ReferenceError exception

  • From: "Houyou Yao" <yaohouyou@xxxxxx>
  • To: "QuickJS" <quickjs-devel@xxxxxxxxxxxxx>
  • Date: Mon, 9 Sep 2019 22:32:29 +0800

Hello??
    The following description is a possible issue for QuickJS:


version: quickjs-2019-08-18


Testcase:
var NISLFuzzingFunc = function() {
    return std;
};
var value = NISLFuzzingFunc();


Command:
./ quickjs-2019-08-18/qjs testcase.js


Output:




Expected output:
Throw ReferenceError on line 2


Description:
QuickJS does not throw an exception when returning an undefined variable, while 
other engines throw ReferenceError on Line 2, such as v8, spiderMonkey, 
javascriptCore, chakra.




Cheers,
Houyou Yao

Other related posts: