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

Unknown exception during compilation: std::bad_cast #8272

Closed
agroce opened this issue Feb 10, 2020 · 0 comments
Closed

Unknown exception during compilation: std::bad_cast #8272

agroce opened this issue Feb 10, 2020 · 0 comments
Assignees
Labels
Milestone

Comments

@agroce
Copy link

agroce commented Feb 10, 2020

Description

This contract:

contract C {
    function f() public returns (uint, uint) {
        try this() {
        } catch Error(string memory) {
        }
    }
}

produces:

Unknown exception during compilation: std::bad_cast

when run with solfuzzer (solc alone seems ok)

On master, using AFL fuzzing. Another discovery using https://github.com/agroce/afl-compiler-fuzzer

Environment

  • Compiler version: 0.6.3-develop.2020.2.10+commit.e8eb1f2d.Linux.clang
  • Target EVM version (as per compiler settings): N/A
  • Framework/IDE (e.g. Truffle or Remix): N/A
  • EVM execution environment / backend / blockchain client: N/A
  • Operating system: Ubuntu 18.04 in docker

Steps to Reproduce

Save this contract in shrink.sol (or whatever filename)

contract C {
    function f() public returns (uint, uint) {
        try this() {
        } catch Error(string memory) {
        }
    }
}

produces:

> solc shrink.sol
Unknown exception during compilation: std::bad_cast
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants