Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work on node 19 #516

Closed
shafouz opened this issue Jul 20, 2023 · 2 comments
Closed

Doesn't work on node 19 #516

shafouz opened this issue Jul 20, 2023 · 2 comments

Comments

@shafouz
Copy link

shafouz commented Jul 20, 2023

Jazzer gives the following error on node 19:

TypeError: firstArgument.includes is not a function
    at Hook.beforeHook [as hookFunction] (/app/node_modules/@jazzer.js/bug-detectors/internal/path-traversal.ts:136:22)
    at module.<computed> (/app/node_modules/@jazzer.js/hooking/manager.ts:240:10)
    at getSource (node:internal/modules/esm/load:38:20)
    at ESMLoader.defaultLoad (node:internal/modules/esm/load:94:38)
    at ESMLoader.load (node:internal/modules/esm/loader:342:43)
    at ESMLoader.moduleProvider (node:internal/modules/esm/loader:207:22)
    at new ModuleJob (node:internal/modules/esm/module_job:63:26)
    at ESMLoader.#createModuleJob (node:internal/modules/esm/loader:231:17)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:184:34)

it works normally on node 18 and 16

Minimal steps to reproduce:

FROM node:19

WORKDIR /app
RUN npm i --save-dev @jazzer.js/core
COPY test_fuzz.js package.json /app/
ENTRYPOINT ["npx", "jazzer", "./test_fuzz.js"]
{
  "name": "test_fuzz",
  "version": "1.0.0",
  "description": "Examples of fuzz tests for Jazzer.js",
  "type": "module"
}
/**
 * @param { Buffer } data
 */
export function fuzz(data) {
  let sum = data.toString();

  if (sum == "2") {
    throw Error("asdasd");
  }
}
@shafouz
Copy link
Author

shafouz commented Jul 20, 2023

the error was because i was using esm instead of the require() one

@shafouz shafouz closed this as completed Jul 20, 2023
@bertschneider
Copy link
Contributor

Thx for the update! ESM support is still on the todo list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants