Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Keystone from existing tests (trailofbits#1684) #5

Merged
merged 14 commits into from
May 11, 2020

Conversation

fengjixuchui
Copy link
Owner

No description provided.

smoelius and others added 14 commits April 24, 2020 10:22
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, {}.
* Better argument names in manticoreEVM api

* blkn

* bugfix
Reverts one of the changes from #1652 to fix the sporadically-failing `test_integer_overflow_multitx_onefunc_feasible` test in `ethereum_bench`
* Move truffle thing to it own CI

* Cosmetic changes to ci
* Improve concretize log messages.

* Update manticore/core/worker.py

Co-authored-by: Eric Hennenfent <[email protected]>

Co-authored-by: Eric Hennenfent <[email protected]>
* Fix a few documentation typos in ManticoreBase

* Fix documentation in ManticoreBase: 'vervosity' -> 'verbosity'

Co-authored-by: Eric Hennenfent <[email protected]>
* Try getting more coverage from truffle-test

* Update codecov.yml

Co-authored-by: Eric Hennenfent <[email protected]>

* Try getting more coverage from truffle-test

* Update ci.yml

* Fix truffle tst state count

* Generate coverage file

Co-authored-by: Eric Hennenfent <[email protected]>
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 <[email protected]> for review!
* Change URL for WASM spec

* Fix URL in other place
* 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 <[email protected]>

* Update tests/native/test_armv7cpu.py

Missed one

Co-authored-by: Brad Larsen <[email protected]>

Co-authored-by: Brad Larsen <[email protected]>
@fengjixuchui fengjixuchui merged commit 2684834 into fengjixuchui:master May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants