https://github.com/trailofbits/manticore

sort by:
Revision Author Date Message Commit Date
cca9dbf Eliminate new_storage method. 12 June 2020, 18:56:03 UTC
ebd8cc0 Balance width fix was incomplete. 12 June 2020, 18:27:26 UTC
3fc4264 Fix bug concerning balance width. 12 June 2020, 18:22:21 UTC
4a23d8a Up SMT timeout for metacoin tests. 12 June 2020, 17:15:44 UTC
8af6869 More ci.yml fixes. 12 June 2020, 16:55:42 UTC
94055f9 Coverage fixes in ci.yml. 12 June 2020, 16:28:35 UTC
cc97a38 Convert gas to constant in make_VMTests.py. 12 June 2020, 13:07:06 UTC
3446e21 Implement Storage.__copy__. 12 June 2020, 13:05:50 UTC
7a38281 Turn off detectors in truffle maze test. 12 June 2020, 09:58:04 UTC
399dd08 Handle case where EXP's exponent is a symbolic constant. 12 June 2020, 03:19:09 UTC
f257ec8 More merge bug fixes. 12 June 2020, 02:31:00 UTC
c29a24a Fix bugs introduced by merge. 12 June 2020, 01:14:37 UTC
6b3dbf3 Simplify Storage.get. 12 June 2020, 01:12:31 UTC
2215ba8 Eliminate unused imports. 12 June 2020, 01:12:04 UTC
a4c599d Callstack type has changed. 11 June 2020, 19:42:42 UTC
02a540e Nominal changes. 11 June 2020, 14:19:44 UTC
91d48ed Use self._set_storage. 11 June 2020, 13:53:21 UTC
1de8eba Use self.get_storage. 11 June 2020, 13:50:03 UTC
3a01360 Set blockheader information. 11 June 2020, 11:57:51 UTC
15d5366 Add comment re disabling uninitialized storage detector. 11 June 2020, 11:46:47 UTC
c4a0471 Fiz __getstae__/__setstate__ names. 11 June 2020, 11:41:44 UTC
b8880cf Interpret coinbase as hex. 11 June 2020, 11:29:18 UTC
60daa52 Blacken. 11 June 2020, 11:22:04 UTC
45b87b8 Correct bitvec width in add_to/sub_from_balance. 11 June 2020, 11:14:39 UTC
49707bd Merge remote-tracking branch 'origin/master' into dev-connect-to-eth-node 11 June 2020, 10:55:34 UTC
bdbd039 Symbolic model for strcpy (#1681) * Working copy for strcpy - without symbolic input * Corrected null term error * Needs to be tested but general algorithm idea for handling symbolic input * Updated according to feedback * Beginning of strcpy tests * Revising strcpy algorithm - realised it was flawed * This should be a more correct way of handling symbolic bytes. Needs testing * Get rid of redundant code * Fixed another typo * Update manticore/native/models.py Co-Authored-By: Eric Kilmer <eric.d.kilmer@gmail.com> * Clarified and updated comments * Fixed some errors in model while working on tests * Progress on tests * Found typo in models * Removed unnecassary whitespace * Added some helper functions for tests and to clean things up * Added comments for helper functions * WIP: current state of strcpy tests * Updated type hints from Expression to BitVec * Fixed linter complaints * Updated strcpy return type to make linter happy * Added some helper properties to expression BitVecITE * Overwrote equal op in ArraySelect * Fixed formatting in expression * Almost done just needs some cleaning * Attempt at overriding __eq__ again * Cleaned up tests some still have unresolved __eq__ issues * Removed stuff from expression and updated test_models.py * Removed stuff from expression and updated test_models.py * Basicly done probably needs some more comments for clarity * Cleaned up the tests a little * Corrected linter error and added more comments to strcpy model functions * Remove duplicated word in comment Co-authored-by: Eric Kilmer <eric.d.kilmer@gmail.com> * Update manticore/native/models.py Co-authored-by: Brad Larsen <brad.larsen@trailofbits.com> * Update manticore/native/models.py Co-authored-by: Brad Larsen <brad.larsen@trailofbits.com> * Update tests/native/test_models.py Co-authored-by: Brad Larsen <brad.larsen@trailofbits.com> * Updates according to feedback * Swapped can_be_true and must be true * Updates for feedback * Forgot to lint * Fixed some typos * Largely simplified ITE being built * Forgot to lint * This is messy but seems to be concretizing to the correct states * Very very messy state of the code before attempting to concretize on every possible NULL * Cleaned up model with forking on every possible NULL * Removed trailing whitespace for CodeClimate * Added state.context for offset value back * New symbolic test with regex for expected output * New symbolic test with regex for expected output * Updated for mypy * Updated comments in tests * Updated cant_be_null to cannot_be_null * Corrected docstring location for _test_strcpy * Add break for efficiency * Added compiler information and source file * Updated regex to use raw strings Co-authored-by: Eric Kilmer <eric.d.kilmer@gmail.com> Co-authored-by: Brad Larsen <brad.larsen@trailofbits.com> 09 June 2020, 21:12:19 UTC
ddec477 Rollback to support yices again (#1714) * Rollback to support yices again * CC * Test yices * Better get-value handling * Z3/CVC4/YICES * CC * Yices/CVC4 * CC * Default yices * Default debug level fix * Quick auto solver * shutil.which * CC * Default yices for testing * Remove old commented out code * Update manticore/core/smtlib/solver.py Co-authored-by: Eric Kilmer <eric.d.kilmer@gmail.com> * Update manticore/core/smtlib/solver.py Co-authored-by: Eric Kilmer <eric.d.kilmer@gmail.com> * Remove unused class * Update manticore/core/smtlib/solver.py Co-authored-by: Eric Kilmer <eric.d.kilmer@gmail.com> * Update manticore/core/smtlib/solver.py Co-authored-by: Eric Kilmer <eric.d.kilmer@gmail.com> * Readme hack * CC/lint * Fix typing * z3 back to the rodeo * lint * Fancy optimize * Fix lint * CC reviewed Co-authored-by: Eric Kilmer <eric.d.kilmer@gmail.com> 09 June 2020, 19:16:18 UTC
7f5f12c Fix default output space when workspace is in mem: (#1724) 09 June 2020, 14:37:38 UTC
4495b6f VMTests tests for istanbul (#1676) * New upstream auto-VMTests tests for istanbul * Removed redundant tests * bugfix * Reset CI * Debug CI 1 * debug CI * wakey wakey GitHub Actions * Poke GH * Fix detector * New CI weaky weaky * Change default smtlib max memory usage weaky weaky * ci weaky waky * ci weaky waky * CI waky weaky * Fix test_general weaky weaky * Fix ethtests. weaky waky * Unittest driven bugfixes. weaky waky * Avoid check-sat in the middle of a solving. weaky wakey * Fix config. weaky wakey * Reduce queries in IO detector * CC * CC * fix nativve tests * CC and solver defaults * merge. weaky waky * Fixing tests * Remove debug print * Fix in DetectUninitializedMemory * Change truffle test state count * CC * Better forking on failed transactions * CC * Fix truffle tst state count * Improve z3 speed * Fix truffle test state count * Change default gas concretization in CALL * Better logging at fork * Insane commit to fix several bugfixes and refator stuff * black * Fix selfdestruct test * Fix some unittests * Default to bytes fo constant calldata * Fix tests * Better doc * https://github.com/trailofbits/manticore/pull/1676/files#r426927762 * https://github.com/trailofbits/manticore/pull/1676/files#r426946198 * Leave native alone and fix pyevmasm dep * Update manticore/platforms/evm.py Co-authored-by: Eric Hennenfent <eric.hennenfent@trailofbits.com> * Update manticore/platforms/evm.py Co-authored-by: Eric Hennenfent <eric.hennenfent@trailofbits.com> * isSeven * OPTI/PESI * Truffle optimistic * truffle fix * Truffle state count * CC * Fix tests PESI/OPTI * Update manticore/core/state.py Co-authored-by: Samuel E. Moelius <35515885+smoelius@users.noreply.github.com> * Better policy naming * Update manticore/platforms/evm.py Co-authored-by: Samuel E. Moelius <35515885+smoelius@users.noreply.github.com> * Update manticore/ethereum/manticore.py Co-authored-by: Samuel E. Moelius <35515885+smoelius@users.noreply.github.com> * Update manticore/platforms/evm.py Co-authored-by: Samuel E. Moelius <35515885+smoelius@users.noreply.github.com> * PESi PESSI * blkn * weaky * wakey wakey * blkn * unreachable * Fix state count in checkpoint test (merge) * remove unused exception var Co-authored-by: Eric Hennenfent <eric.hennenfent@trailofbits.com> Co-authored-by: Samuel E. Moelius <35515885+smoelius@users.noreply.github.com> 04 June 2020, 22:27:59 UTC
3650e57 Snapshots & is_main (#1710) * Snapshots * CC * Allow snapshooting just from main() * A test * Test and fix is_main * CC * review * ismain vs is_running * is main to is main script * Remove unused member variable * Fix is main variable * Update manticore/core/manticore.py Co-authored-by: Eric Hennenfent <eric.hennenfent@trailofbits.com> * review * blkn * Betteer Exception handling * Lint and test Co-authored-by: Eric Hennenfent <eric.hennenfent@trailofbits.com> 02 June 2020, 21:03:01 UTC
6747143 Fix Black (#1718) * Use merge SHA instead of head Github Actions doesn't update the head variable despite the checkout action merging the active branch into `master`, so the commit range specified was invalid * Start from common ancestor * Omit explicit SHA * Lint HEAD instead of merge * Manually fetch base SHA * Print the names of files to be diffed * Update ci.yml * Modify a Python file * Blacken everything that was missing The modified files got missed due to black not properly running on our CI 28 May 2020, 19:54:31 UTC
8f59f39 Merge remote-tracking branch 'origin/master' into dev-connect-to-eth-node 25 May 2020, 15:30:25 UTC
6054033 Move get_items into ArrayProxy. 25 May 2020, 15:22:28 UTC
235d0b5 Add docstring to Storage.new_storage. 24 May 2020, 12:01:57 UTC
2c90ee0 Use CoverageRC, Make CodeCov Less Aggressive (#1705) * Experimental coverage changes Tells coverage.py to record coverage for individual test cases, and makes CodeCov tolerate a small drop in overall coverage percentage to account for nondeterministic gas tests. * Use workspace * Remove explicit concurrency type declaration Appears to break use of subprocess in integration tests * Eliminate dynamic context * Make all CI respect rcfile * Use environment variable 19 May 2020, 21:58:31 UTC
c39f870 Fix plugin enable/disable magic (#1708) * FIx enable/disable magic * CC * Test enable/disable * Remove duplicated code 19 May 2020, 21:56:53 UTC
c2b847a Add a warning when selected no methods for inclusion (#1707) * Add a warning when selected no methods for inclusion * CC 19 May 2020, 17:05:47 UTC
8e6c481 Remove duplicated entries (#1709) Github automatically parses the issue templates and adds them to the config file, so they don't need to be included here. 19 May 2020, 15:42:44 UTC
24161e4 Blacken (#1711) 18 May 2020, 23:49:08 UTC
704007e Fix symbolic syscall arg concretization (#1697) * Rewind cpu when ConcretizeArgument is raised in system call * Remove unused ConcretizeSyscallArgument * Add test for symbolic system call argument * Roll back PC during handling of ConcretizeArgument This accomplishes the same thing as before but now the movement is done in the parent state instead of children states * Statically link test executable * Use simple checkpoint and rollback for PC * Rework checkpoint and rollback in exception-handling * Create rollback function in State This is to make sure we don't miss anything when adding future values * Define only one local variable for exception data * Remove unused import * Less verbosity in test * Rollback in parent state instead of children states * Always rollback state on Concretize* * Use typing.NamedTuple Thank you @bradlarsen * Use local checkpoint variable We don't access checkpoint data anywhere else aside from the `execute` function * Add type hint to test Co-authored-by: Brad Larsen <brad.larsen@trailofbits.com> * Use more specific language in test comment Co-authored-by: Brad Larsen <brad.larsen@trailofbits.com> * Remove outdated function name in comment * Fix missed refactor * Remove unneeded testing changes after refactor Co-authored-by: Brad Larsen <brad.larsen@trailofbits.com> 18 May 2020, 18:14:34 UTC
b3558fe Merge remote-tracking branch 'origin/master' into dev-connect-to-eth-node 17 May 2020, 20:42:02 UTC
bf79b80 Update README, Add Issue Templates (#1685) * Add canned issue templates * Fix URL params * Update the README * Add CLA * Update Youtube URL * Remove sudo from example readme * Reword dependencies in main readme * Replace mkvirtualenv with default version 15 May 2020, 18:28:01 UTC
747ad69 Rename Storage.data to Storage._data. 15 May 2020, 11:10:31 UTC
c3ae87f Eliminate use of dirty. 15 May 2020, 01:55:59 UTC
44e6c0a Do not store constraints in Storage. 15 May 2020, 00:35:38 UTC
55e2486 Fix inheritance magic and add plugin enable/disable (#1696) * Fix inheritance magic nonsens and add plugin enable/disable * CC * Better Plugin default * Fix enabled default * Trying to generalize enable/disable for plugins * Merger is the only plugin using locked context correctly * Fix plugin context name * text to enum 13 May 2020, 17:44:58 UTC
4f7027b Add hashing to constraintSets (#1703) * Add hashing to constraintSets * CC * fix bytearray related tests * Change get_related default 13 May 2020, 17:07:39 UTC
5a707f1 Reduce log messages (#1700) * Change concretization log message from info to debug. * Deprioritize helper (e.g., serialization) log messages. 12 May 2020, 20:15:22 UTC
7a5f0c7 Updated Proc error message to be more informative (#1704) 12 May 2020, 18:56:28 UTC
4cccd4d Move states that selfdestruct to the ready queue. (#1699) 12 May 2020, 18:28:24 UTC
9299033 Reduce concrete hash log messages. (#1695) 12 May 2020, 18:24:20 UTC
b1d93d2 Remove Keystone from existing tests (#1684) * Cache generated ASM * Never install Keystone on the CI * Fix dict retreival one-liner arguments aren't lazily evaluted, so ks_assemble always got called * Apply suggestions from code review Docstrings and type hints Co-authored-by: Brad Larsen <brad.larsen@trailofbits.com> * Update tests/native/test_armv7cpu.py Missed one Co-authored-by: Brad Larsen <brad.larsen@trailofbits.com> Co-authored-by: Brad Larsen <brad.larsen@trailofbits.com> 11 May 2020, 15:42:47 UTC
90b4d45 Change URL for WASM spec (#1702) * Change URL for WASM spec * Fix URL in other place 11 May 2020, 15:42:12 UTC
cc77ace Overhaul Linux file emulation (#1673) Overhaul Linux file emulation. Previously, open file descriptors could be mapped to any of the `File`, `Directory`, `SocketDesc`, `Socket`, and `ProcSelfMaps` classes, which didn't share a common supertype, and which didn't have consistent interfaces. Now, each of these classes implements the `FdLike` abstract base class, which specifies a number of methods. This overhaul additionally fixes several issues with the Linux support code: - A program that tried to ioctl on a socket would crash Manticore - In several places, the error code returned by a failing syscall was incorrect - Many file descriptor operations could crash Manticore when used on an already-closed descriptor - Manticore state serialization / deserialization was incorrect for file descriptor types other than File or Socket - In certain cases, `sys_open` / `sys_openat` could crash Manticore when trying to log a debug message - In certain cases, `sys_readv` could crash Manticore, instead of correctly returning a negative int value - `sys_sendfile` was broken due to a variable name typo - In several places in Manticore’s Linux support code, incorrect type hints were present - In some places, an exception would attempt to be raised, but that itself would crash due to a missing import. This commit adds two more example / integration test programs. Additionally, this adds a helper for working with Python abstract base classes. This helper lets you declare on a class, via a decorator, that the class is expected to have no unimplemented abstract methods. If this is not true at runtime, a `TypeError` is thrown. Without this decorator, you will only discover that a class has unimplemented abstract methods when you try to _instantiate_ that class. This may be much, much later than at class creation time, or perhaps not at all, depending on your code coverage. Thanks to Eric Kilmer <eric.d.kilmer@gmail.com> for review! 08 May 2020, 17:57:41 UTC
eecd9b5 Update ci.yml Add -p to coverage run. 08 May 2020, 15:45:17 UTC
af3cc7d Merge branch 'master' into dev-connect-to-eth-node 08 May 2020, 15:27:06 UTC
a5c2ddc Eliminate ci.yml conflicts. 08 May 2020, 15:24:10 UTC
56a38f0 Reduce log messages. 08 May 2020, 14:28:54 UTC
556a492 Remove reference to map. 08 May 2020, 09:28:45 UTC
f3dcd63 Try getting more coverage from truffle-test (#1694) * Try getting more coverage from truffle-test * Update codecov.yml Co-authored-by: Eric Hennenfent <eric.hennenfent@trailofbits.com> * Try getting more coverage from truffle-test * Update ci.yml * Fix truffle tst state count * Generate coverage file Co-authored-by: Eric Hennenfent <eric.hennenfent@trailofbits.com> 05 May 2020, 20:21:46 UTC
4746e5d Eliminate deprecation warning in solidity_create_contract. (#1692) 05 May 2020, 17:10:50 UTC
0bdcea4 Fix a few documentation typos in ManticoreBase (#1687) * Fix a few documentation typos in ManticoreBase * Fix documentation in ManticoreBase: 'vervosity' -> 'verbosity' Co-authored-by: Eric Hennenfent <eric.hennenfent@trailofbits.com> 04 May 2020, 22:41:56 UTC
2b04eee Add set_verbosity to the documentation (#1688) Co-authored-by: Eric Hennenfent <eric.hennenfent@trailofbits.com> 04 May 2020, 22:41:09 UTC
4b26ced Adjust z3 options. (#1691) 04 May 2020, 21:32:01 UTC
ad5c48b Improve concretize log messages (#1686) * Improve concretize log messages. * Update manticore/core/worker.py Co-authored-by: Eric Hennenfent <eric.hennenfent@trailofbits.com> Co-authored-by: Eric Hennenfent <eric.hennenfent@trailofbits.com> 04 May 2020, 21:30:03 UTC
894d22e Move truffle to its own CI type (#1693) * Move truffle thing to it own CI * Cosmetic changes to ci 04 May 2020, 19:59:00 UTC
88ddfbc Add nonce checks to test_gas_check. 04 May 2020, 13:11:37 UTC
6ccbd49 Experimenting with Storage simplifications. 04 May 2020, 10:29:13 UTC
53117d2 Adjust z3 options. 01 May 2020, 18:35:13 UTC
96bfc80 Remove default gas limit (#1689) Reverts one of the changes from #1652 to fix the sporadically-failing `test_integer_overflow_multitx_onefunc_feasible` test in `ethereum_bench` 01 May 2020, 17:23:21 UTC
abe52bc Add EVMWorld.get_storage_items. 01 May 2020, 09:56:12 UTC
ee206c4 Fix error in ci.yml. 01 May 2020, 01:36:49 UTC
18bf648 Better error handling/reporting. 01 May 2020, 01:15:20 UTC
a3e70e2 Add missing newline. 01 May 2020, 00:52:34 UTC
954e92f Correct EVMWorld.get_storage docstring. 30 April 2020, 18:09:47 UTC
a7d090a Re-add EVMWorld.get_storage docstring. 30 April 2020, 17:45:12 UTC
b3089b7 Blacken. 30 April 2020, 14:11:28 UTC
92a1849 Add storage tests. 30 April 2020, 14:10:58 UTC
ea1b2bd Add EVMWorld.get_storage. 30 April 2020, 14:10:23 UTC
fbebf32 Change how Storage objects are allocated. 30 April 2020, 14:08:49 UTC
a1b06de Add constraints parameter to WorldState.get_storage_data. 30 April 2020, 14:05:46 UTC
5228962 Better argument names in manticoreEVM api (#1652) * Better argument names in manticoreEVM api * blkn * bugfix 28 April 2020, 19:48:14 UTC
462982a Add error message in OverlayWorldState.get_storage. 28 April 2020, 15:26:37 UTC
09879e1 Store newly created Storage in world_state. 28 April 2020, 14:33:48 UTC
fd562db Move OverlayWorldState comment into docstring. 28 April 2020, 13:39:02 UTC
7454fa4 Raise EthereumError on connection failure. 28 April 2020, 12:39:37 UTC
8a77ad4 Blacken non-compliant files (#1680) 24 April 2020, 20:57:59 UTC
2dfba13 Disable core __get_related logic (#1674) There is a flaw in how __get_related works: when called on certain unsatisfiable sets, it can return a satisfiable one. The flaw arises when: * self consists of a single constraint C * C is the value of the related_to parameter * C contains no variables * C is unsatisfiable Since C contains no variables, it is not considered "related to" itself and is thrown out by __get_related. Since C was the sole element of self, __get_related returns the empty set. Thus, __get_related was called on an unsatisfiable set, {C}, but it returned a satisfiable one, {}. 24 April 2020, 17:22:16 UTC
06da949 Update option description. 24 April 2020, 11:31:30 UTC
0d3254a Add bad IP/port tests. 24 April 2020, 00:28:00 UTC
1e82ec4 Make CodeCov wait for reports from all CI jobs (#1661) * Make CodeCov wait for reports from all CI jobs This should prevent the red 'X' from appearing as soon as the first job finishes. * Make CI step fail if codecov fails to upload * Run examples with coverage * Copy coverage file appropriately * Fix path to coverage file * Add comment about n builds * Disable failing CI upon error. 23 April 2020, 20:57:09 UTC
cd3b7e6 Create accounts when not using RPC. 23 April 2020, 20:52:13 UTC
96d65e5 New instructions (#1644) * New instructions * Update evm.py * Link pyevmasm master * blkn * Fix pyevmasm dep * Fix pyevmasm link * Fix pyevmasm link * Fix deps * Remove bad merge 23 April 2020, 18:44:25 UTC
d15cddf "--txvictim" -> "--txtarget". 23 April 2020, 18:40:22 UTC
e0c7272 Create DefaultWorldState only once. 23 April 2020, 17:57:51 UTC
bc5085b Fix types. 23 April 2020, 15:45:24 UTC
4c51644 Rework syscall invocation for proper behavior under typeguard (#1672) * Rework syscall invocation for proper behavior under typeguard Previously, using Typeguard with Manticore would break several emulated syscalls. With this commit, it does not. Some background information: When a syscall is made from an emulated binary, Manticore uses the syscall number to look up the appropriate Python method that models that syscall, and then uses Python introspection to massage arguments to that syscall model function as deemed appropriate. Previously, this mechanism used the deprecated `inspect.getfullargspec` to determine the number of arguments to the model function, and whether or not it takes varargs. However, `inspect.getfullargspec` doesn't look through wrapper functions; it looks only at exactly the function object it is given. This is an issue, however, when trying to inspect _decorated_ functions. (The use of a decorator in Python introduces a _new_ function object that wraps the decorated item.) How did that break Manticore when using Typeguard? It turns out that When using Typeguard via the `--typeguard-packages=manticore` option to `pytest`, the Typeguard plugin implicitly adds a `@typeguard.check_types` decorator on _every_ function & method in the `manticore` package. In this way, each syscall implementation function in Manticore ends up with a wrapper around it, and the syscall invocation mechanism based on `inspect.getfullargspec` would somewhat quietly cause syscalls to break. Now, instead of using `inspect.getfullargspec`, Manticore's syscall invocation mechansim uses the non-deprecated `inspect.signature` API to get the needed information. This API _does_ look through wrapper functions. Additionally, it allows us to get rid of some conditional logic, about whether `self` appears in a function's parameter list or not. * Update manticore/native/cpu/abstractcpu.py * Get rid of the `wrapt` library We only were using `wrapt` in a single place -- to implement the `unimplemented` syscall decorator. That dependency was added in #1384, so that the old syscall mechanism could work with the decorator. Now, with the rework of Manticore's syscall mechanism, this is no longer necessary, and a "regular" Python decorator implemented using `functools.wraps` should work just fine. * Fix rewrite of `unimplemented` * Rework platform `unimplemented` decorator, take 3 Additionally, add some extra tests for the decorator, to get better coverage from where it is used. * Clean up `test_sycalls.py` imports * Fix an unbound variable error (found with `mypy --check-untyped-defs` and some grep) * Get rid of some unused imports 22 April 2020, 22:42:42 UTC
e9c5c53 printable_bytes (#1671) Extract printable bytes from return data in the same way as it is currently done for logs. 17 April 2020, 20:10:44 UTC
52f215e Fix several incorrect type hints (#1668) * Delete simultaneously dead & broken code * Fix an overly specific type hint in smtlib `Bool.cast` * Fix type confusion in Solver internal methods * Fix type confusion in Linux symbolic file support * Fix type confusion in Linux platform & abstract CPU * Fix an incorrect type hint & clarify documentation in Linux `sys_open` * Fix type confusion in `unimplemented` decorator * Remove some `Generator` return type signatures; mypy/typeguard/`@contextmanager` do not agree with each other * Delete a couple bad type hints The `dirfd` and `buf` parameters can be symbolic, and the type-checking that mypy does has trouble understanding `issymbolic`. So, un-type-hintify those parameters. * Add type hints & fix typing issues in manticore.core.workspace * Remove some wrong type hints from AbstractCpu It turns out that the type of `data` in a couple methods is pretty flexible, and our tests use more than just `str`, `bytes`, and `List` types for that parameter. It is not quite clear what requirements there actually are on `data`, and so at least for now, get rid of the type hint there. * Add type hints & fix a typing issue in manticore.native.cpu.x86 **kwargs could not have possibly worked in `AMD64Operand`. * Make the type hint of `Z3Solver._send` tighter. * Update manticore/core/workspace.py Remove unused import (thanks @ehennenfent!) * Use more specific types (thanks @ehennenfent!) 17 April 2020, 19:08:03 UTC
9b03025 Add type hints to several parts of Manticore (#1667) * Add type hints * Add type hints in manticore/core/smtlib/solver.py * Add type hints to the `unsigned_hexlify` helper function * Add type hints & more robust error checking to a Solver internal method * Add type hints in native memory code * Add type hints to Linux platform test methods * Add type hints for Linux `sys_access` * Add type hints for AbstractCPU; rephrase a couple bits to appease mypy * Add type hints to manticore/platforms/linux.py * Add type hints for Workspace members * Add type hints for `Operand` * Add a return type hint per @ekilmer Co-Authored-By: Eric Kilmer <eric.d.kilmer@gmail.com> 16 April 2020, 22:21:20 UTC
back to top