Testcase:
var NISLFuzzingFunc = function() {
"use strict";
eval("var public = 1;");
};
NISLFuzzingFunc();
Command:
./build/bin/hermes -w testcase.js
Output:
Expected output:
Throw SyntaxError on Line 3
Description:
According to the ES standard, eval code is strict mode code if the call to eval is contained in strict mode code. In the testcase above, the eval code should be strict mode code, and the reserved word "public" cannot be used as a variable name in strict mode, so a SyntaxError should be thrown on Line 3. However, Hermes did not throw any exceptions when running the above testcase.
The reference of the ES standard is as follows:
http://www.ecma-international.org/ecma-262/6.0/index.html#sec-strict-mode-code
Version: 3ed8340
Testcase:
Command:
./build/bin/hermes -w testcase.jsOutput:
Expected output:
Throw SyntaxError on Line 3
Description:
According to the ES standard, eval code is strict mode code if the call to eval is contained in strict mode code. In the testcase above, the eval code should be strict mode code, and the reserved word "public" cannot be used as a variable name in strict mode, so a SyntaxError should be thrown on Line 3. However, Hermes did not throw any exceptions when running the above testcase.
The reference of the ES standard is as follows:
http://www.ecma-international.org/ecma-262/6.0/index.html#sec-strict-mode-code