Skip to content

Exception in an import callback leaves the compiler in an inconsistent state, leading to You shall not have another CompilerStack aside me error on next compilation #675

Open
@neocho

Description

@neocho

Hi, I'm getting an internal exception error but I'm not too sure why. I'm running solc on an express server.

Steps to getting this error:

  1. Compile a contract that has invalid imports
  2. Try to compile a contract that has valid imports
  3. solc.compile() throws error

Error i'm getting:

{
  errors: [
    {
      component: 'general',
      formattedMessage: 'Internal exception in StandardCompiler::compile: /solidity/libsolidity/interface/CompilerStack.cpp(107): Throw in function solidity::frontend::CompilerStack::CompilerStack(ReadCallback::Callback)\n' +
        'Dynamic exception type: boost::wrapexcept<solidity::langutil::InternalCompilerError>\n' +
        'std::exception::what: You shall not have another CompilerStack aside me.\n' +
        '[solidity::util::tag_comment*] = You shall not have another CompilerStack aside me.\n',
      message: 'Internal exception in StandardCompiler::compile: /solidity/libsolidity/interface/CompilerStack.cpp(107): Throw in function solidity::frontend::CompilerStack::CompilerStack(ReadCallback::Callback)\n' +
        'Dynamic exception type: boost::wrapexcept<solidity::langutil::InternalCompilerError>\n' +
        'std::exception::what: You shall not have another CompilerStack aside me.\n' +
        '[solidity::util::tag_comment*] = You shall not have another CompilerStack aside me.\n',
      severity: 'error',
      type: 'InternalCompilerError'
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛high effortA lot to implement but still doable by a single person. The task is large or difficult.medium impactDefault level of impactmust haveSomething we consider an essential part of Solidity 1.0.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions