* Partially implement fork(2)
Really this return ENOSYS (not implemented), which allows sub-processes to
detect the condition and continue to run (or crash on their own if they did not
expect fork() to fail).
* Move sys_fork to correct class; add a basic docstring
* Partially implement chroot(2)
Really this return EPERM (permission denied), which seems to be absolutely fine
since a non-privileged user is currently assumed. This is what would normally
be returned in this scenario.
* update chroot implementation
Really this return EPERM (permission denied), which seems to be absolutely fine
since a non-privileged user is currently assumed. This is what would normally
be returned in this scenario.
Really this return ENOSYS (not implemented), which allows sub-processes to
detect the condition and continue to run (or crash on their own if they did not
expect fork() to fail).
* Loads shared ELF to analyze a function
See #69
* Bring in recent changes to concolic.py
* Loads shared ELF to analyze a function
* Fix the 'linux' class method prototype
* Added optional message parameter in ConcretizeMemory
In some files (e.g. manticore/core/cpu/abstractcpu.py), ConcretizeMemory is invoked with a message but it is interpreted as the "policy" value now, causing a crash. This commit should fix that issue.
* Small code refactoring to address code review
This preserves the current behavior of using a string value as Solidity
source code, but now also supports instances of the `file` type, and
will use the `name` property of the file object to pass to the
subprocess invocation of solc.
This implementation also now ensures resource cleanup for the stdout and
stderr pipe handles.
Make use of compiling via file handles in multi_tx_analysis
This will enable import statements in Solidity code to work for the
Manticore CLI out of the box
Note, Manticore still wants the source code, so if we compiled using a file
handle, rather than a source string, we need to read in the source
fixes#705
Manticore assumed that new calls to brk(2) were always increasing the
size of the data segment. This is not always true, since programs may
decide to reduce it as well.
Tested with a static Linux/i386 program on macOS/amd64.
* added all the uint types supported by solidity
* fixed some incorrect indentation
* Added missing space around "+"
* added some proper exceptions and included all the integer parameter types
* improved exception handling
* missing check
* added preliminary version of unit test for ABI
* x
* half finished
* tes
* fixes
* docstr
* Raise exception only once
* cc
* Fix merge bug
* fix merge bug in tests
* Fix bugs introduced in merge
* Port most of the less invasive/controversial changes from dev-evm-dynamicarguments
* Port section of fixes from ethereum.py
* Port tests unrelated to concretizing dyn args
* Add remaining changes from evm.py
* clean, fmt, code climate
* rm unnecessary setup
* disable??
* fmt
* remove all the returns
* lol cc
* Rm unused code
* port to .format
* don't use map (for py2/3 compat)
* simplify slicing
* Rm dyn arg code, since it doesn't really even work
and will be included when dev-evm-dynamicarguments is totally resolved
* add address/get_uint test
* Revert "Rm dyn arg code, since it doesn't really even work"
69188da4caf1ff74288b6398e8140f627dc495c4
* Add trace file
* Make ethersplay compatible trace format
* Small cleanup
* Record separate init and rt traces, emit separate trace files
* add todo
* More pythonic
* Add test for end insn in trace file
* Fix test
* Move trace accumulation into will_evm_execute callback
here, we can easily and correctly check the .last_exception field
to see if we were in init code or rt code. from the did_evm_execute hook
the last instruction (end instruction) had a different .last_exception
so this was causing the last instruction to not be recorded in the trace.
* Add contract keyword arg to IntegrationTest._simple_cli_run
* Remove inline tests from test_eth
* Refactor IntegrationTest.test_eth_regressions to support multi-contract files
* rm unnecessary return, change assert to graceful handle
* Add regression test
* Add regression test
* Correct logic
* Rm unnecessary check
This branch is unnecessary, if this condition is true, then ultimately
the executor will do nothing, and we'll simply return anyway.
* Raise NoAliveStates if no alive states to execute
* docstr update
* Update mult_tx_analysis to handle NoAliveStates
* Fancy
* Update test
* Codeclimate fmt
* fmt
* better readability
* add docstr
* pep8
autopep8 -r -i -a -a manticore
* tox for testing py3k
* minimal codeclimate
* Add correct Code Climate ID
* unignore max line endings since it's set to 160
* more badges
* turn off pep8 in code climate
* need to remove for codeclimate to work right
* re-enable most checks with looser thresholds
* remove unused imports
autoflake --in-place -r manticore
* revert the autoflakes changes
* set tox to only py27 for now
* cache is hardcoded to python 2.7.13
* Comment cleanup
* Try autoflake again
* Add dev environment dependency management to tox.ini
* Remove count/statistics options from tox.ini
Per Dan, these crash pep8 analysis on codeclimate at present
* Revert setstate initialization
* Re-introduce explicit compare for flags
* add back structural comment
* rm unneeeded ` as e`
* bump py tox
* Added a function to generate evm testcases without using callbacks
Possible fix for #782
* The 'message' parameter in generate_testcase should be optional
Requested by @montyly