-
Notifications
You must be signed in to change notification settings - Fork 540
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
wrong constraint path after the memory update #1128
Comments
You may compare symbolic and concrete memory states. And concertize symbolic state if they differ. |
How can I compare the states? Should I compare the concrete values and the symbolic values from that address? |
What do you means? Do you means that the path constraint (from
This is no longer relevant since now when calling |
I have the following function:
I use Triton to make symbolic execution, but when a system or a library call occurs that call is executed by another tool. After that call, I try to restore the context by copying sections of memory to Triton. In this case, after the printf call, it seems that something goes wrong because Triton cannot identify the constraint that comes from the second if. The second constraint is not added to the constraint path. I use |
You probably called The best way when restoring context from another tool is to verify if there is a desynch like @SweetVishnya said. For example, take a look to a QBDI+Triton tool. Especially the following part of the code: # Triton callback. This callback is called when triton need to know
# the concrete value of memory cells. Synchronize memory cells between
# Triton and QBDI
def mem_read(tt, mem):
addr = mem.getAddress()
size = mem.getSize()
qbdi_value = pyqbdi.readMemory(addr, size)
triton_value = tt.getConcreteMemoryAreaValue(addr, size)
# If qbdi and triton mem cells are not equal, synch Triton with
# the context of qbdi
if qbdi_value != triton_value:
print(F"[triton] Memory cells ({addr:x}:{size:d}) synchronization")
tt.setConcreteMemoryAreaValue(addr, qbdi_value)
return |
I use in my implementation |
You can do the same thing but with |
Hi,
I am trying to make symbolic execution. I want to update the memory and some registers at a certain point of execution using the following functions void setConcreteMemoryValue(integer addr, integer value) and void setConcreteRegisterValue(Register reg, integer value), but there is a problem with the constraint path. The documentation says that these functions imply a desynchronization with the symbolic state. What can I do in this case in order to restore de symbolic state?
Thank you,
Rares
The text was updated successfully, but these errors were encountered: