diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2018-08-06 21:54:24 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-06 21:54:24 +0200 |
| commit | e4a255d9c6175b5d9f2ab15471d848705fe1cc4e (patch) | |
| tree | 4abec8cd2d938bfe3745c663de60cf2bc7d5295a | |
| parent | 3ff3aed6b0e5bcc8bd1959a562dd3c1ec8142081 (diff) | |
| parent | 6b52674875dfd8d74216905484511b4657852880 (diff) | |
| download | miasm-e4a255d9c6175b5d9f2ab15471d848705fe1cc4e.tar.gz miasm-e4a255d9c6175b5d9f2ab15471d848705fe1cc4e.zip | |
Merge pull request #815 from commial/fix/dse-concrete
DSE: fix a bug happening in rare case
| -rw-r--r-- | miasm2/analysis/dse.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/miasm2/analysis/dse.py b/miasm2/analysis/dse.py index 0c01610f..fb332154 100644 --- a/miasm2/analysis/dse.py +++ b/miasm2/analysis/dse.py @@ -178,6 +178,8 @@ class DSEEngine(object): self.jitter.cpu, self.jitter.vm, self.ir_arch, {} ) + ### Avoid side effects on jitter while using 'symb_concrete' + self.symb_concrete.func_write = None ## Update registers value self.symb.symbols[self.ir_arch.IRDst] = ExprInt( @@ -345,7 +347,9 @@ class DSEEngine(object): # -> Use a fully concrete execution to get back path # Update the concrete execution - self._update_state_from_concrete_symb(self.symb_concrete) + self._update_state_from_concrete_symb( + self.symb_concrete, cpu=True, mem=True + ) while True: next_addr_concrete = self.symb_concrete.run_block_at( @@ -431,8 +435,7 @@ class DSEEngine(object): if mem: # Values will be retrieved from the concrete execution if they are # not present - for symbol in symbexec.symbols.symbols_mem.copy(): - del symbexec.symbols[symbol] + symbexec.symbols.symbols_mem.base_to_memarray.clear() if cpu: regs = self.ir_arch.arch.regs.attrib_to_regs[self.ir_arch.attrib] for reg in regs: |