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

SMT logic error for a conditional with empty tuple types #14929

Closed
alex1448 opened this issue Mar 9, 2024 · 0 comments · Fixed by #15025
Closed

SMT logic error for a conditional with empty tuple types #14929

alex1448 opened this issue Mar 9, 2024 · 0 comments · Fixed by #15025
Assignees

Comments

@alex1448
Copy link

alex1448 commented Mar 9, 2024

Description

The following code triggers the exception shown bellow. I tested this locally with the latest compiler version 0.8.24 and then I tested on remix for older versions. The problem seems to appear with version 0.7.5 but with a different kind of exception: SMTLogicException: out of memory. For versions >=0.8.17 the exception is: SMTLogicException: parser error (full compiler output bellow).

Steps to Reproduce

testcase.sol

// SPDX-License-Identifier: GPL-3.0

pragma solidity =0.8.24;

contract C {
    function f() public pure {
        true ? () : ();
    }
}
solc testcase.sol --model-checker-engine all
SMT logic error:
./libsmtutil/Z3Interface.cpp(179): Throw in function z3::expr solidity::smtutil::Z3Interface::toZ3Expr(const solidity::smtutil::Expression&)
Dynamic exception type: boost::wrapexcept<solidity::smtutil::SMTLogicError>
std::exception::what: parser error
[solidity::util::tag_comment*] = parser error

Environment

  • Compiler version: >=0.7.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants