Skip to content

Commit

Permalink
Fix a bug about ret_size in Func and MemoryLoad
Browse files Browse the repository at this point in the history
  • Loading branch information
hwu71 committed Jun 24, 2023
1 parent 2a58a15 commit c13d3e4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions claripy/ast/func.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ class Func(Base):

def __init__(self, *args, **kwargs):
#super().__init__(*args, **kwargs)
self.ret_size = self._ret_size if self._ret_size is not None else 32
self._ret_size = kwargs['_ret_size'] if '_ret_size' in kwargs else 32

self.func_name = self.op
self.args = self.args
args_type = [type(arg) for arg in self.args]
self.func_op = operations.op(self.func_name, args_type, BV, bound=False, calc_length=lambda *a: self.ret_size)
self.func_op = operations.op(self.func_name, args_type, BV, bound=False, calc_length=lambda *a: self._ret_size)
#operations.backend_func_operations.add(self.op)

def get_func_name(self):
Expand All @@ -26,6 +26,6 @@ def get_func_name(self):

class MemoryLoad(Base):
def __init__(self, *args, **kwargs):
self.ret_size = self._ret_size if self._ret_size is not None else 32
self._ret_size = kwargs['_ret_size'] if '_ret_size' in kwargs else 32
self.args = self.args
self.op = operations.op('MemoryLoad', BV, BV, bound=False, calc_length=lambda *a: self.ret_size)
self.op = operations.op('MemoryLoad', BV, BV, bound=False, calc_length=lambda *a: self._ret_size)

0 comments on commit c13d3e4

Please sign in to comment.