Skip to content

Commit

Permalink
Prevent Fuzzilli from generating async arrow functions during mutation
Browse files Browse the repository at this point in the history
Summary:
Hermes currently does not support async arrow functions, so let's prevent `AsyncArrowFunctionGenerator` from being selected by the `CodeGenMutator`

```test.js

async function asyncFunction() {
  console.log('test');
}

(async () => {
    console.log(await asyncFunction());
})();
```

```./hermes test.js
test.js:5:2: error: async functions are unsupported
(async () => {
 ^~~~~~~~~~~~~
Emitted 1 errors. exiting.
```

Differential Revision: D39601546

fbshipit-source-id: 120ae9ebdc1a9552ae2a034592b8af302dc07716
  • Loading branch information
0xedward authored and facebook-github-bot committed Sep 19, 2022
1 parent ca53222 commit e7a7468
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/fuzzers/fuzzilli/profile/HermesProfile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ let hermesProfile = Profile(

additionalProgramTemplates: WeightedList<ProgramTemplate>([]),

disabledCodeGenerators: ["AsyncGeneratorFunctionGenerator", "ClassGenerator", "WithStatementGenerator"],
disabledCodeGenerators: ["AsyncArrowFunctionGenerator", "AsyncGeneratorFunctionGenerator", "ClassGenerator", "WithStatementGenerator"],

additionalBuiltins: [
"gc" : .function([] => .undefined),
Expand Down

0 comments on commit e7a7468

Please sign in to comment.