From c0acb0fd4bd2bd0866326a9452af1352583750a9 Mon Sep 17 00:00:00 2001 From: Eric Hennenfent Date: Mon, 6 Apr 2020 09:48:35 -0700 Subject: [PATCH 1/2] Bump version of checkout script and some Python packages Unicorn, black, and mypy --- .github/workflows/ci.yml | 2 +- setup.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 15df89ae5..950b83d5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Set up Python 3.6 uses: actions/setup-python@v1 with: diff --git a/setup.py b/setup.py index 355124359..df36d821b 100644 --- a/setup.py +++ b/setup.py @@ -14,9 +14,9 @@ def rtd_dependent_deps(): # If you update native_deps please update the `REQUIREMENTS_TO_IMPORTS` dict in `utils/install_helper.py` # (we need to know how to import a given native dependency so we can check if native dependencies are installed) -native_deps = ["capstone==4.0.1", "pyelftools", "unicorn==1.0.2rc1"] +native_deps = ["capstone==4.0.1", "pyelftools", "unicorn==1.0.2rc2"] -lint_deps = ["black==19.3b0", "mypy==0.740"] +lint_deps = ["black==19.10b0", "mypy==0.770"] # Development dependencies without keystone dev_noks = ( From accef66c678a82bd2933aaf83e0d5bec34459fab Mon Sep 17 00:00:00 2001 From: Eric Hennenfent Date: Mon, 6 Apr 2020 10:01:44 -0700 Subject: [PATCH 2/2] Fix typing issue with potential missing file descriptor --- manticore/core/smtlib/solver.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/manticore/core/smtlib/solver.py b/manticore/core/smtlib/solver.py index ef0bee38f..ec77e4747 100644 --- a/manticore/core/smtlib/solver.py +++ b/manticore/core/smtlib/solver.py @@ -300,8 +300,14 @@ def _send(self, cmd: str): """ # logger.debug('>%s', cmd) try: - self._proc.stdout.flush() - self._proc.stdin.write(f"{cmd}\n") + if self._proc.stdout: + self._proc.stdout.flush() + else: + raise SolverError("Could not flush stdout: file descriptor is None") + if self._proc.stdin: + self._proc.stdin.write(f"{cmd}\n") + else: + raise SolverError("Could not write to stdin: file descriptor is None") except IOError as e: raise SolverError(str(e))