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

Scribble crashes on interposing on calls like super.fun() #244

Closed
cd1m0 opened this issue Sep 21, 2023 · 0 comments · Fixed by #245
Closed

Scribble crashes on interposing on calls like super.fun() #244

cd1m0 opened this issue Sep 21, 2023 · 0 comments · Fixed by #245

Comments

@cd1m0
Copy link
Collaborator

cd1m0 commented Sep 21, 2023

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
cd1m0 added a commit that referenced this issue Sep 21, 2023
cd1m0 added a commit that referenced this issue Sep 21, 2023
@blitz-1306 blitz-1306 linked a pull request Sep 21, 2023 that will close this issue
cd1m0 added a commit that referenced this issue Sep 21, 2023
* Fix for #244

* Fix tests

* Test fail nits
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

Successfully merging a pull request may close this issue.

1 participant