Open manunio opened 10 months ago
Try exporting typescript code to es5 (set "target": "es5",
in the tsconfig.json
).
ES6 is not supported in CLI mode. You could also use the @jazzer.js/jest-runner for fuzzing--it supports everything that Jest supports, including ES6: https://github.com/CodeIntelligenceTesting/jazzer.js/blob/main/docs/jest-integration.md
Try exporting typescript code to es5 (set
"target": "es5",
in thetsconfig.json
).ES6 is not supported in CLI mode. You could also use the @jazzer.js/jest-runner for fuzzing--it supports everything that Jest supports, including ES6: https://github.com/CodeIntelligenceTesting/jazzer.js/blob/main/docs/jest-integration.md
Hi, Thanks for reply and tip for es5, The problem i'm facing is error message adds lots of text (with jazzer -help content) , is this expected behavior ? for example it includes this part
jazzer <fuzz_target> [corpus..]
Coverage-guided, in-process fuzzer for the Node.js platform.
The "target" module has to export a function "fuzz" which accepts a byte array
as first parameter and uses that to invoke the actual function to fuzz.
while it should only include this
/home/maxx/dev/security/oss-fuzz-projects/meriyah/dist/src/meriyah.js:1
import { parseSource } from './parser';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1178:20)
at Module._compile (node:internal/modules/cjs/loader:1220:27)
at Module._compile (/home/maxx/dev/security/oss-fuzz-projects/meriyah/node_modules/source-map-support/source-map-support.js:568:25)
at Module.replacementCompile (/home/maxx/dev/security/oss-fuzz-projects/meriyah/node_modules/append-transform/index.js:60:13)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Object.<anonymous> (/home/maxx/dev/security/oss-fuzz-projects/meriyah/node_modules/append-transform/index.js:64:4)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Function.Module._load (node:internal/modules/cjs/loader:960:12)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at require (node:internal/modules/cjs/helpers:119:18)
at Object.<anonymous> (/home/maxx/dev/security/oss-fuzz-projects/meriyah/fuzz.js:1:25)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._compile (/home/maxx/dev/security/oss-fuzz-projects/meriyah/node_modules/source-map-support/source-map-support.js:568:25)
at Module.replacementCompile (/home/maxx/dev/security/oss-fuzz-projects/meriyah/node_modules/append-transform/index.js:60:13)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Object.<anonymous> (/home/maxx/dev/security/oss-fuzz-projects/meriyah/node_modules/append-transform/index.js:64:4)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Function.Module._load (node:internal/modules/cjs/loader:960:12)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:169:29)
at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
Yes, indeed, that should not happen! We will take a look. Thanks for reporting :+1:
Ah, that should be fixed with https://github.com/CodeIntelligenceTesting/jazzer.js/pull/695 that's currently in review.
Description
Hi, while attempting to make jazzer run in https://github.com/meriyah/meriyah
jazzer v2.1.0
addshelp
content along with error message.While downgrading jazzer to v2.0.0 prints following error message
Steps to reproduce
git clone https://github.com/manunio/meriyah.git && cd meriyah
npm install
npm run build
npx jazzer fuzz