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

Z3 StringV abstraction broken #298

Closed
1 task done
zwimer opened this issue Oct 27, 2022 · 0 comments · Fixed by #317
Closed
1 task done

Z3 StringV abstraction broken #298

zwimer opened this issue Oct 27, 2022 · 0 comments · Fixed by #317
Assignees
Labels

Comments

@zwimer
Copy link
Member

zwimer commented Oct 27, 2022

Description

claripy is unable to abstract StringV from z3.

A traceback from: claripy.backend_manager.backends.z3.simplify(claripy.StringV("abc"))

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/zwimer/.virtualenvs/test/lib/python3.10/site-packages/claripy/backends/backend_z3.py", line 92, in z3_condom
    return f(*args, **kwargs)
  File "/home/zwimer/.virtualenvs/test/lib/python3.10/site-packages/claripy/backends/backend_z3.py", line 1016, in simplify
    o = self._abstract(s)
  File "/home/zwimer/.virtualenvs/test/lib/python3.10/site-packages/claripy/backends/backend_z3.py", line 92, in z3_condom
    return f(*args, **kwargs)
  File "/home/zwimer/.virtualenvs/test/lib/python3.10/site-packages/claripy/backends/backend_z3.py", line 414, in _abstract
    return self._abstract_internal(e.ctx.ctx, e.ast)
  File "/home/zwimer/.virtualenvs/test/lib/python3.10/site-packages/claripy/backends/backend_z3.py", line 536, in _abstract_internal
    a = self._string_constant_from_ast(ctx, ast, decl)
  File "/home/zwimer/.virtualenvs/test/lib/python3.10/site-packages/claripy/backends/backend_z3.py", line 718, in _string_constant_from_ast
    raise BackendError("Weird Z3 model")
claripy.errors.BackendError: Weird Z3 model

Steps to reproduce the bug

import claripy
a = claripy.StringV("abc")
claripy.backend_manager.backends.z3.simplify(a)

Environment

> mkvirtualenv test
> pip install claripy

Additional context

Before fixing this (and having it work fully), these issues need to be addressed:

@zwimer zwimer added the bug label Oct 27, 2022
@zwimer zwimer self-assigned this Nov 5, 2022
@zwimer zwimer linked a pull request Nov 5, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant