Commit Graph
8 Commits
Author SHA1 Message Date
Eric HennenfentandBrad Larsen 8565705f79 Fix LGTM Errors (#1656)
* py/missing-call-to-init

* Remove deprecated should_profile argument

* WASM __init__ call and variable names

* Mute warnings about printing evm account IDs

LGTM thinks we're logging potentially sensitive data when we create a symbolic account and print the user ID. I can't imagine a context where we would ever care about this alert in general, so I'm going to disable it.

* Fix mixed attribute/function names

* Another missing __init__ call

* Remove single-op form of _bitwise_instruction

It's never used

* Use built-in ops instead of lambda

* Missing import

* Some unreachable code

Still missing some in evm.py

* Blacken

* Tag examples as examples

* NotImplemented -> NotImplementedError

* Fix unnecessary `pass`

* Revert "Remove single-op form of _bitwise_instruction"

This reverts commit 1b7a4110f4.

* Mute overzealous call argument error

Co-authored-by: Brad Larsen <[email protected]>
2020-04-08 13:49:28 -07:00
Eric Hennenfent 451965f03a Blacken Manticore (#1438)
* Add black to CI tests

I'd rather have blackening be an optional check, but this will work for now

* Yep, messed up Travis

Again, sorry about the commit spam

* Bump accepted line length to 120

Going to auto-format at 100 but will allow 20% overruns

* Blacken

* Cap line length at 100

rip my undisciplined coding habits

* update black on the fly if necessary

* Ignore CC errors

* Only check modified files

* Only python files

* Re-blacken post merge

* Re-Blacken

* Fix deleted files

* Explicitly invoke python

The +x must not have gotten commited

* Forgot to blacken again

Hoisted on my own petard

* Re-blacken
2019-05-23 15:19:24 -05:00
Stephan Tolksdorf a7bf228251 Fix all ResourceWarnings triggered by the test suite (#1224)
* Prevent ResourceWarnings in Z3Solver._stop_proc

* Wrap temporary uses of open in with statement

* Close program file in platforms.linux.Linux destructor

* Close files opened in tests

This commit also ensures that the tempdir created in _create_openat_state in test_linux.py is deleted at the end of the test.

* Fix binary file open modes

* Enable ResourceWarnings in Travis build

* Fix codeclimate issue: bad indent

* Suppress harmless ResourceWarning emitted during the initial abitypes parser table generation
2018-10-27 01:18:48 +02:00
Disconnect3d 5c44a34374 Convert format strings to literal string interpolation [rebased] (#1194)
* Convert format strings to literal string interpolation
This commit converts most (only a couple of exceptions) of the formatted strings in Manticore to follow PEP-0498, literal string interpolation.

* Converted most format strings to f-strings, except for some in tests

* Fixing codeclimate issues

* Updated the new format strings that appeared after merging, fixed a flipped set of parameters

* Fixed another incorrect quote typo

* fixed extra quote typo
2018-10-18 11:03:19 +02:00
defunct a0c2f76311 Port remaining examples to py3 (#1042)
* port use_def

* port some scripts, cleanup

* ported `scripts/gdb.py` - untested

* misc
2018-08-10 15:28:41 -04:00
Paul Kehrer 1fcb249ac7 incremental py3: print statements, octals, and more (#908)
* incremental py3: automated conversion work

print statements, octal literals, and various small changes to support
identical calling between py2 and py3. Plus a few missed exception
syntax, etc.

* more print function imports, fix a syntax issue

* revert an import change for the moment

* different absolute import
2018-06-04 11:52:04 -03:00
Paul Kehrer 2d2ba9068c switch the exception syntax to py3 compatible (#904) 2018-05-30 00:16:59 -03:00
Yan 2916d7e3ae Support tracing (#247)
* Script for generating syscall tables

* Add generated syscall table

* Reintroduce tracing script

* Add configuration options needed by verify.py

* Clean up verify; remove dependency on experimental after_hook

* trace experiments

* reorg verify.py

* Update after merge

* Remove Manticore param

* Remove unused vars

* Use regfile api; redo last_instr check

* Fix gdb->mcore name descrepancy

* Move kwargs to explicit args for Linux/SLinux

 * Maintain options in makeLinux to not overcomplicate the Manticore
   class

* Address merge issues

* remove debug stmt

* Reintroduce options

* Revert linux.py/manticore.py from master

* Use the qemu -s and -R flags

* Import syscalls table from master

* And import extract_syscalls.py script

* Fix verify reference

* Move syscall to arg

* Update register references

* Simplify last instruction check

* Add logging filter to TRACE logger as well

* Be consistent with state synchronization

* Be explicit about gdb types

* Improve mmap debug output

* Return error if ioctl is not implemented

* Fix syscall sync

* Make logging more self-contained

* Use errno const in ioctl impl
2017-06-05 16:16:54 -04:00