Hello,
I get an exception when I try to get the CFG for the following code:
const fs = require('fs');
fs.open('/open/some/file.txt', 'r', (err, fd) => {
if (err) throw err;
fs.close(fd, (err) => {
if (err) throw err;
});
});
The error is:
TypeError: Cannot set property 'nextSibling' of undefined
at backToFront (node_modules/esgraph/lib/index.js:369:56)
at BlockOrProgram (node_modules/esgraph/lib/index.js:374:7)
at recurse (node_modules/walkes/index.js:20:10)
at /Users/saba/Documents/northeastern/research/async-miner/node_modules/walkes/index.js:40:10
at Array.forEach (<anonymous>)
at checkProps (node_modules/walkes/index.js:34:20)
at recurse (node_modules/walkes/index.js:20:10)
at Array.map (<anonymous>)
at /Users/saba/Documents/northeastern/research/async-miner/node_modules/walkes/index.js:38:15
at Array.forEach (<anonymous>)
at checkProps (node_modules/walkes/index.js:34:20)
at recurse (node_modules/walkes/index.js:20:10)
at /Users/saba/Documents/northeastern/research/async-miner/node_modules/walkes/index.js:40:10
at Array.forEach (<anonymous>)
at checkProps (node_modules/walkes/index.js:34:20)
at recurse (node_modules/walkes/index.js:20:10)
at backToFront (node_modules/esgraph/lib/index.js:370:9)
at BlockOrProgram (node_modules/esgraph/lib/index.js:374:7)
at recurse (node_modules/walkes/index.js:20:10)
at walker (node_modules/walkes/index.js:24:9)
at linkSiblings (node_modules/esgraph/lib/index.js:376:5)
at ControlFlowGraph (node_modules/esgraph/lib/index.js:47:3)
at Parser.getCfg (app/parser.js:25:17)
I don't have any issues for calls that are not nested. E.g., if the fs.close() is not included, I won't have any issues.
I'd appreciate any help.
Hello,
I get an exception when I try to get the CFG for the following code:
The error is:
I don't have any issues for calls that are not nested. E.g., if the fs.close() is not included, I won't have any issues.
I'd appreciate any help.