googleprojectzero / googleprojectzero/fuzzilli
Unhandled node type SwitchStatement
Open
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 2.3k
- Forks
- 367
- Avg merge
- 23h 53m
- Merged PRs (30d)
- 1
Description
node parser.js ../../Protobuf/ast.proto code.js output.ast.proto
code.js:
switch (x) {};
Switch statements do not yet seem to be supported on rev d386a838.
<repo>/Sources/Fuzzilli/Compiler/Parser/parser.js:324
throw "Unhandled node type " + node.type;
^
Unhandled node type SwitchStatement
Thrown at:
at visitStatement (<repo>/Sources/Fuzzilli/Compiler/Parser/parser.js:324:17)
at visitProgram (<repo>/Sources/Fuzzilli/Compiler/Parser/parser.js:51:37)
at parse (<repo>/Sources/Fuzzilli/Compiler/Parser/parser.js:561:12)
at <repo>/Sources/Fuzzilli/Compiler/Parser/parser.js:570:15
at finish (<repo>/Sources/Fuzzilli/Compiler/Parser/node_modules/protobufjs/src/root.js:105:9)
at process (<repo>/Sources/Fuzzilli/Compiler/Parser/node_modules/protobufjs/src/root.js:143:13)
at <repo>/Sources/Fuzzilli/Compiler/Parser/node_modules/protobufjs/src/root.js:195:17
at fetchReadFileCallback (<repo>/Sources/Fuzzilli/Compiler/Parser/node_modules/@protobufjs/fetch/index.js:51:19)
at readFileAfterClose (node:internal/fs/read/context:68:3)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Sources/Fuzzilli/Compiler/Parser/parser.js, especially visitStatement at line 324, and reproduce the failure with the shown parser.js command and code.js input. Trace how nearby statement types are handled, then verify that a SwitchStatement no longer raises the unhandled-node error and that the generated output is accepted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100