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

Incorrect type conversion processing in sol compiler may cause solidity compiler crash. #5721

Closed
zhongyinglou opened this issue Dec 24, 2018 · 2 comments
Assignees
Labels

Comments

@zhongyinglou
Copy link

@zhongyinglou zhongyinglou commented Dec 24, 2018

1_type conversion crash input.zip

Internal compiler error during compilation:
solidity/libsolidity/codegen/CompilerUtils.cpp(673): Throw in function void dev::solidity::CompilerUtils::convertType(const dev::solidity::Type&, const dev::solidity::Type&, bool, bool, bool)
Dynamic exception type: boost::exception_detail::clone_impl<langutil::InternalCompilerError>
std::exception::what: Invalid type conversion requested.
[dev::tag_comment*] = Invalid type conversion requested.
@axic axic added the bug 🐛 label Jan 2, 2019
@axic
Copy link
Member

@axic axic commented Feb 25, 2019

Cleaned up example:

contract A {
  function f() pure public {
    ufixed16x2(bytes1(uint8(0)));
  }
}

@axic
Copy link
Member

@axic axic commented Feb 25, 2019

This is due to allowing FixedBytesType to FixedPointType conversion in ast/Types.c, but actually not having it implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants