Merge branch 'develop' into speedup/sha

pull/1124/head
Nikhil Parasaram 6 years ago committed by GitHub
commit 2efaa02c2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 16
      mythril/laser/ethereum/plugins/implementations/dependency_pruner.py

@ -44,11 +44,15 @@ class DependencyAnnotation(StateAnnotation):
return self.storage_written[iteration] return self.storage_written[iteration]
def extend_storage_write_cache(self, iteration: int, value: object): def extend_storage_write_cache(self, iteration: int, value: object):
if iteration not in self.storage_written: try:
self.storage_written[iteration] = [value] if iteration not in self.storage_written:
else: self.storage_written[iteration] = [value]
if value not in self.storage_written[iteration]: else:
self.storage_written[iteration].append(value) if value not in self.storage_written[iteration]:
self.storage_written[iteration].append(value)
except Z3Exception as e:
# FIXME: This should not happen unless there's a bug in laser such as a BitVec512 being generated
log.debug("Error updating storage write cache: {}".format(e))
class WSDependencyAnnotation(StateAnnotation): class WSDependencyAnnotation(StateAnnotation):
@ -154,7 +158,7 @@ class DependencyPruner(LaserPlugin):
else: else:
self.dependency_map[address] = [target_location] self.dependency_map[address] = [target_location]
except Z3Exception as e: except Z3Exception as e:
# This should not happen unless there's a bug in laser, such as an invalid type being generated. # FIXME: This should not happen unless there's a bug in laser such as a BitVec512 being generated
log.debug("Error updating dependency map: {}".format(e)) log.debug("Error updating dependency map: {}".format(e))
def protect_path(self, path: List[int]) -> None: def protect_path(self, path: List[int]) -> None:

Loading…
Cancel
Save