Skip to content

Commit

Permalink
Make claripy true and false functions
Browse files Browse the repository at this point in the history
  • Loading branch information
twizmwazin committed Sep 21, 2024
1 parent d64c7c2 commit d57fbab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions angr_platforms/bf/engine_bf.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def process_successors(self, successors, **kwargs):
# ...except if it IS symbolic. That means we ran off the memory.
# Drop the mic and go home. We're done here.
the_end = state.copy()
successors.add_successor(the_end, state.ip, claripy.true, "Ijk_Exit", add_guard=False, exit_stmt_idx=-1,
successors.add_successor(the_end, state.ip, claripy.true(), "Ijk_Exit", add_guard=False, exit_stmt_idx=-1,
exit_ins_addr=state.ip, source=my_block)
break
# Step 1: Decode. If it's a....
Expand All @@ -121,7 +121,7 @@ def process_successors(self, successors, **kwargs):
newstate = state.copy()
newstate.regs.inout = 1 # Set this to 0 to cause a write syscall
newstate.ip = state.ip + 1
successors.add_successor(newstate, newstate.ip, claripy.true, "Ijk_Syscall",
successors.add_successor(newstate, newstate.ip, claripy.true(), "Ijk_Syscall",
add_guard=False, exit_stmt_idx=-1, exit_ins_addr=state.ip, source=my_block)
# Syscalls, even fake ones like this, end a basic block.
break
Expand All @@ -130,7 +130,7 @@ def process_successors(self, successors, **kwargs):
new_state = state.copy()
new_state.regs.inout = 0 # This must be 0 when we do a syscall to get a read!
new_state.ip = state.ip + 1
successors.add_successor(new_state, new_state.ip, claripy.true, "Ijk_Syscall",
successors.add_successor(new_state, new_state.ip, claripy.true(), "Ijk_Syscall",
add_guard=False, exit_stmt_idx=-1, exit_ins_addr=state.ip, source=my_block)
# Syscalls, even fake ones like this, end the basic block
break
Expand Down
2 changes: 1 addition & 1 deletion angr_platforms/ct64/ct64_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def execute(self, state, successors):

state.regs._ip += self.LEN
state.memory.store(dest, value)
successors.add_successor(state, state.regs._ip, claripy.true, 'Ijk_Boring')
successors.add_successor(state, state.regs._ip, claripy.true(), 'Ijk_Boring')

def value(self, state):
raise NotImplementedError
Expand Down

0 comments on commit d57fbab

Please sign in to comment.