Skip to content

Commit d46eea1

Browse files
committed
merge master in
2 parents 4323bef + 334b3aa commit d46eea1

File tree

23 files changed

+14547
-14492
lines changed

23 files changed

+14547
-14492
lines changed

CHANGELOG.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,37 @@
11
# Change Log
22

3-
## [Unreleased](https://github.com/trailofbits/manticore/compare/0.3.4...HEAD)
3+
## [Unreleased](https://github.com/trailofbits/manticore/compare/0.3.5...HEAD)
4+
5+
## 0.3.5 - 2020-11-06
6+
7+
Thanks to our external contributors!
8+
- [wolfo](https://github.com/trailofbits/manticore/commits?author=wolfo)
9+
- [geohot](https://github.com/trailofbits/manticore/commits?author=geohot)
10+
- [romits800](https://github.com/trailofbits/manticore/commits?author=romits800)
11+
12+
### Ethereum
13+
* Made EVM module ignore runtime gas calculations by default [#1816](https://github.com/trailofbits/manticore/pull/1816)
14+
* Updated gas calculations for calls to empty accounts [#1774](https://github.com/trailofbits/manticore/pull/1774)
15+
* Fixed account existence checks for `selfdestruct` and `call` [#1801](https://github.com/trailofbits/manticore/pull/1801)
16+
17+
### Native
18+
* **[Added API]** new `strlen` models [#1725](https://github.com/trailofbits/manticore/pull/1725)
19+
* **[Added API]** State-specific hooks [#1777](https://github.com/trailofbits/manticore/pull/1777)
20+
* Improved system call argument handling [#1785](https://github.com/trailofbits/manticore/pull/1785)
21+
* Improved `stat` support for file descriptors [#1780](https://github.com/trailofbits/manticore/pull/1780)
22+
* Support symbolic-length reads from sockets [#1786](https://github.com/trailofbits/manticore/pull/1786)
23+
* Add stubs for `sendto` [#1791](https://github.com/trailofbits/manticore/pull/1791)
24+
25+
### WASM
26+
* Fix type confusion when importing external functions [#1803](https://github.com/trailofbits/manticore/pull/1803)
27+
28+
### Other
29+
* Made [Yices2](https://yices.csl.sri.com/) the default SMT Solver [#1820](https://github.com/trailofbits/manticore/pull/1820)
30+
* **[Added API]** Added an API for introspecting live states [#1775](https://github.com/trailofbits/manticore/pull/1775)
31+
* Changed default multiprocessing type to threading [#1779](https://github.com/trailofbits/manticore/pull/1779)
32+
* Improved array serialization performance [#1756](https://github.com/trailofbits/manticore/pull/1756)
33+
* Fix name collisions in SMT variables [#1792](https://github.com/trailofbits/manticore/pull/1792)
34+
435

536
## 0.3.4 - 2020-06-26
637

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,10 @@ for idx, val_list in enumerate(m.collect_returns()):
229229
* We're still in the process of implementing full support for the EVM Istanbul instruction semantics, so certain opcodes may not be supported.
230230
In a pinch, you can try compiling with Solidity 0.4.x to avoid generating those instructions.
231231

232-
## Using a different solver (Z3, Yices, CVC4)
232+
## Using a different solver (Yices, Z3, CVC4)
233233
Manticore relies on an external solver supporting smtlib2. Currently Z3, Yices and CVC4 are supported and can be selected via commandline or configuration settings.
234-
By default Manticore will use Z3. Once you've installed a different solver, you can choose which one to use like this:
235-
```manticore --smt.solver yices```
234+
If Yices is available, Manticore will use it by default. If not, it will fall back to Z3 or CVC4. If you want to manually choose which solver to use, you can do so like this:
235+
```manticore --smt.solver Z3```
236236
### Installing CVC4
237237
For more details go to https://cvc4.github.io/. Otherwise just get the binary and use it.
238238

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@
5454
# built documents.
5555
#
5656
# The short X.Y version.
57-
version = "0.3.4"
57+
version = "0.3.5"
5858
# The full version, including alpha/beta/rc tags.
59-
release = "0.3.4"
59+
release = "0.3.5"
6060

6161
# The language for content autogenerated by Sphinx. Refer to documentation
6262
# for a list of supported languages.

examples/linux/introspect_state.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@
99
description="Explore a binary with Manticore and print the tree of states"
1010
)
1111
parser.add_argument(
12-
"binary", type=str, nargs="?", default="binaries/multiple-styles", help="The program to run",
12+
"binary",
13+
type=str,
14+
nargs="?",
15+
default="binaries/multiple-styles",
16+
help="The program to run",
1317
)
1418
args = parser.parse_args()
1519

examples/script/concolic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def eq(a, b):
110110

111111

112112
def perm(lst, func):
113-
""" Produce permutations of `lst`, where permutations are mutated by `func`. Used for flipping constraints. highly
113+
"""Produce permutations of `lst`, where permutations are mutated by `func`. Used for flipping constraints. highly
114114
possible that returned constraints can be unsat this does it blindly, without any attention to the constraints
115115
themselves
116116

manticore/__main__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,9 @@ def positive(value):
211211
)
212212

213213
eth_flags.add_argument(
214-
"--limit-loops", action="store_true", help="Limit loops depth",
214+
"--limit-loops",
215+
action="store_true",
216+
help="Limit loops depth",
215217
)
216218

217219
eth_flags.add_argument(

manticore/core/plugin.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,9 @@ def on_execution_intermittent_callback(
638638
state.id,
639639
)
640640
update_cb(
641-
context.setdefault(state.id, StateDescriptor(state_id=state.id)), *args, **kwargs,
641+
context.setdefault(state.id, StateDescriptor(state_id=state.id)),
642+
*args,
643+
**kwargs,
642644
)
643645
context[state.id].last_intermittent_update = datetime.now()
644646

manticore/core/smtlib/solver.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class SolverType(config.ConfigEnum):
6363

6464
consts.add(
6565
"solver",
66-
default=SolverType.yices,
66+
default=SolverType.auto,
6767
description="Choose default smtlib2 solver (z3, yices, cvc4, auto)",
6868
)
6969

@@ -794,7 +794,7 @@ def _solver_version(self) -> Version:
794794
class YicesSolver(SMTLIBSolver):
795795
def __init__(self):
796796
init = ["(set-logic QF_AUFBV)"]
797-
command = f"{consts.yices_bin} --timeout={consts.timeout * 1000} --incremental"
797+
command = f"{consts.yices_bin} --timeout={consts.timeout} --incremental"
798798
super().__init__(
799799
command=command,
800800
init=init,

manticore/core/worker.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,10 @@ def start(self, target: typing.Optional[typing.Callable] = None):
246246
thread as an argument.
247247
"""
248248
logger.debug(
249-
"Starting Daemon %d. (Pid %d Tid %d).", self.id, os.getpid(), threading.get_ident(),
249+
"Starting Daemon %d. (Pid %d Tid %d).",
250+
self.id,
251+
os.getpid(),
252+
threading.get_ident(),
250253
)
251254

252255
self._t = threading.Thread(target=self.run if target is None else target, args=(self,))

manticore/ethereum/manticore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ def create_account(self, balance=0, address=None, code=None, name=None, nonce=No
797797
raise EthereumError("Name already used")
798798

799799
# Balance check
800-
if not isinstance(balance, int):
800+
if not isinstance(balance, (int, BitVec)):
801801
raise EthereumError("Balance invalid type")
802802

803803
if isinstance(code, str):

0 commit comments

Comments
 (0)