angr/claripy

'ValueSet' object has no attribute 'LShR'

Closed this issue · 4 comments

I was trying to generate VFG for small binaries using the following code :

def analyze(binary_path):

    proj = angr.Project(binary_path,
    load_options={'auto_load_libs': False},
    use_sim_procedures=True,
    default_analysis_mode='symbolic')
    cfg = proj.analyses.CFGEmulated(normalize=True,context_sensitivity_level=1,resolve_indirect_jumps=True)
    main_fun = cfg.functions.function(name = 'main')
    print(main_fun.addr)
    vfg = proj.analyses.VFG(cfg,start=main_fun.addr,
    context_sensitivity_level=2,
    interfunction_level=4,
    max_iterations=40,
    remove_options={ angr.options.OPTIMIZE_IR })

    nodes=vfg._nodes
    
    print(nodes)

But for the binary (attached below) VSA fails with the following error

File "/home/lavo07/.local/lib/python3.8/site-packages/claripy/ast/base.py", line 1118, in __getattr__
    return getattr(backends, model_name).convert(self)
  File "/home/lavo07/.local/lib/python3.8/site-packages/claripy/backends/backend_vsa.py", line 99, in convert
    return Backend.convert(self, expr.ite_excavated if isinstance(expr, Base) else expr)
  File "/home/lavo07/.local/lib/python3.8/site-packages/claripy/backends/__init__.py", line 196, in convert
    r = self._call(ast.op, args)
  File "/home/lavo07/.local/lib/python3.8/site-packages/claripy/backends/__init__.py", line 250, in _call
    obj = self._op_raw[op](*args)
  File "/home/lavo07/.local/lib/python3.8/site-packages/claripy/backends/backend_vsa.py", line 325, in LShR
    return expr.LShR(shift_amount)
AttributeError: 'ValueSet' object has no attribute 'LShR'

Any idea as to what is wrong? Perhaps my code running VFG is not correct?

test4.zip

I experienced the same problem. Have you solved this problem yet?

This issue has been marked as stale because it has no recent activity. Please comment or add the pinned tag to prevent this issue from being closed.

This issue has been closed due to inactivity.

See my comments here: angr/angr#3217 (comment)

We can't really provide much support for VFG right now, but if you're at all interested we can work with you to take ownership of this code!