Consensys/scribble

Scribble crashes on interposing on calls like `super.fun()`

cd1m0 opened this issue · 0 comments

cd1m0 commented

Scribble's call interposing logic doesn't correctly handle calls like super.fun() since it tries to treat super as a concrete call receiver. This results in stack traces like this one:

There was an error instrumenting your contracts with scribble:
/usr/local/lib/node_modules/eth-scribble/node_modules/solc-typed-ast/dist/misc/utils.js:27
    throw new Error((0, __1.fmt)(message, ...details));
          ^

Error: Expected base to be a reference to a contract, not super(ERC725YCore#229)
    at assert (/usr/local/lib/node_modules/eth-scribble/node_modules/solc-typed-ast/dist/misc/utils.js:27:11)
    at interposeCall (/usr/local/lib/node_modules/eth-scribble/dist/instrumenter/interpose.js:250:37)
    at replaceExternalCallSites (/usr/local/lib/node_modules/eth-scribble/dist/instrumenter/instrument.js:550:63)
    at instrumentContract (/usr/local/lib/node_modules/eth-scribble/dist/instrumenter/instrument.js:355:9)
    at instrumentFiles (/usr/local/lib/node_modules/eth-scribble/dist/bin/scribble.js:236:49)
    at /usr/local/lib/node_modules/eth-scribble/dist/bin/scribble.js:642:13