Skip to content

Commit

Permalink
Reduce concrete hash log messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed May 5, 2020
1 parent 96bfc80 commit 808f8af
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions manticore/ethereum/manticore.py
Original file line number Diff line number Diff line change
Expand Up @@ -1180,12 +1180,13 @@ def _on_unsound_symbolication(self, state, func, data, result):
if value is not None:
with self.locked_context("ethereum", dict) as ethereum_context:
global_known_pairs = ethereum_context.get(f"symbolic_func_conc_{name}", set())
global_known_pairs.add((data, value))
ethereum_context[f"symbolic_func_conc_{name}"] = global_known_pairs
if (data, value) not in global_known_pairs:
global_known_pairs.add((data, value))
ethereum_context[f"symbolic_func_conc_{name}"] = global_known_pairs
logger.info(f"Found a concrete {name} {data} -> {value}")
concrete_pairs = state.context.get(f"symbolic_func_conc_{name}", set())
concrete_pairs.add((data, value))
state.context[f"symbolic_func_conc_{name}"] = concrete_pairs
logger.info(f"Found a concrete {name} {data} -> {value}")
else:
# we can not calculate the concrete value lets use a fresh symbol
with self.locked_context("ethereum", dict) as ethereum_context:
Expand Down

0 comments on commit 808f8af

Please sign in to comment.