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

Overridden virtual functions: internal compile error. #56

Open
michael-emmi opened this issue Aug 15, 2019 · 4 comments
Open

Overridden virtual functions: internal compile error. #56

michael-emmi opened this issue Aug 15, 2019 · 4 comments

Comments

@michael-emmi
Copy link

It seems that overriding an inherited virtual function causes a crash!

Not clear whether this is something you want to deal with, since (a) this example also crashes solc, and (b) there are probably other practical ways of avoiding the verification of A.f — other than deleting its body.

$ cat a.sol && solc-verify.py a.sol 
pragma solidity ^0.5.0;

contract A {
    int x;

    /// @notice postcondition x == 0
    function f() internal;
}

contract B is A {
    function f() internal { }

    /// @notice postcondition x == 0;
    function g() public { A.f(); }
}
Error while running compiler, details:
Internal compiler error during compilation:
/Users/mje/Code/solidity-boogie/libsolidity/codegen/ContractCompiler.cpp(1036): Throw in function void dev::solidity::ContractCompiler::appendModifierOrFunctionCode()
Dynamic exception type: boost::wrapexcept<langutil::InternalCompilerError>
std::exception::what: 
[dev::tag_comment*] = 
@dddejan
Copy link
Member

dddejan commented Aug 18, 2019

@michael-emmi did you report this upstream?

@michael-emmi
Copy link
Author

I have not yet. I have seen a related issue ethereum#5130 which was fixed in ethereum#5558 in December, but I haven’t determined whether the code we’re using includes ethereum#5558.

@dddejan
Copy link
Member

dddejan commented Aug 21, 2019

i added a comment to ethereum#5130, it's basically the same issue but the fix missed this case

@chriseth
Copy link

Tracked in ethereum#7314

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

No branches or pull requests

3 participants