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

SMTChecker is unable to accurately determine the output of bytes.concat #15073

Open
Subway2023 opened this issue May 2, 2024 · 1 comment
Open
Assignees
Labels
needs investigation nice to have We don’t see a good reason not to have it but won’t go out of our way to implement it. smt
Projects

Comments

@Subway2023
Copy link

Environment

  • Compiler version: 0.8.25
  • Target EVM version (as per compiler settings): No restrictions
  • Framework/IDE (e.g. Truffle or Remix): Command-line
  • EVM execution environment / backend / blockchain client: None
  • Operating system: Linux

Steps to Reproduce

contract test {
    function f() public {
        bytes memory a="1";
        bytes memory b="2";

        bytes memory c=bytes.concat(a,b);
        assert(c.length==2);
    }
}
solc test.sol --model-checker-engine chc --model-checker-show-unproved --model-checker-timeout 0

image

@blishko blishko added nice to have We don’t see a good reason not to have it but won’t go out of our way to implement it. smt needs investigation and removed bug 🐛 labels May 8, 2024
@blishko blishko added this to To Do in SMT Checker via automation May 8, 2024
@blishko
Copy link
Contributor

blishko commented May 8, 2024

This is another false positive due to overapproximations in the encoding.
We will investigate if we can make the encoding more precise.

@pgebal pgebal self-assigned this May 9, 2024
@pgebal pgebal moved this from To Do to In Progress in SMT Checker May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs investigation nice to have We don’t see a good reason not to have it but won’t go out of our way to implement it. smt
Projects
SMT Checker
  
In Progress
Development

No branches or pull requests

3 participants