trailofbits / manticore

Symbolic execution tool
https://blog.trailofbits.com/2017/04/27/manticore-symbolic-execution-for-humans/
GNU Affero General Public License v3.0
3.66k stars 471 forks source link

Incorporate typeguard pytest plugin #1584

Open smoelius opened 4 years ago

smoelius commented 4 years ago

https://typeguard.readthedocs.io/en/latest/#using-the-pytest-plugin

I did some preliminary experiments using typeguard's import hook directly. Specifically, I inserted these lines at the start of manticore.py:

from typeguard.importhook import install_import_hook

install_import_hook("manticore")

Those experiments suggested that there are bugs present within the codebase that typeguard exposes.

bradlarsen commented 4 years ago

This is an excellent issue. Indeed, running our test suite with the pytest plugin for Typeguard, there are many issues detected with incorrect type hints.

This is relevant to #1645, where I've been adding a bunch more type hints to the Linux platform emulation code.