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

Lack of support for function pointers #798

Closed
ggrieco-tob opened this issue Jul 12, 2022 · 3 comments
Closed

Lack of support for function pointers #798

ggrieco-tob opened this issue Jul 12, 2022 · 3 comments
Assignees
Labels
hevm Requires changes in hevm

Comments

@ggrieco-tob
Copy link
Member

Run echidna on this:

pragma solidity ^0.7.1;

contract FunctionArg {

    function echidna_test() external pure returns (bool) {
      return true;
    }

    function ptr(function()external f) public {
        f();
    }
}

will result in:

echidna-test: internal error: method type
CallStack (from HasCallStack):
  error, called at src/EVM/Solidity.hs:339:22 in hevm-0.49.0-GY0kNk5Azi3A3vL1VQ1lX4:EVM.Solidity

which is caused by hevm not parsing correctly that ABI feature.

@ggrieco-tob
Copy link
Member Author

This will not be fixed in Echidna, instead we will wait until hevm provides supports

@arcz arcz added the hevm Requires changes in hevm label Jan 24, 2023
@samalws
Copy link
Contributor

samalws commented Mar 8, 2023

Implemented this change at https://github.com/samalws/echidna/tree/fnPtr, won't do an echidna PR until the relevant hevm commit (ethereum/hevm@24a6777) is put into an hevm release

@arcz
Copy link
Member

arcz commented Mar 18, 2023

I've updated hevm here #986

@arcz arcz closed this as completed Mar 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hevm Requires changes in hevm
Projects
None yet
Development

No branches or pull requests

3 participants