-
Notifications
You must be signed in to change notification settings - Fork 472
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
TUI Support Infrastructure #1620
Conversation
* Update worker thread for server creation * Add necessary files for TUI connectivity * Add necessary files for TUI connectivity * Update MonitorWorker * Update protocol * Blacken * Update setup.py dependencies * Remove state debugging messages * Update setup.py to build protobuf protocol upon install * Remove previously generated state_pb2.py * Change subprocess.Popen to subprocess.check_output * Remove extraneous output * First attempt at fixing protobuf installation It might work, it might not. We'll let the CI sort it out. * Can't forget the f-string * Error on missing protoc * Disable auto-generation of protobuf file * Ignore pb2_errors * Disable monitor start See if this makes the EVM tests pass Co-authored-by: Eric Hennenfent <ecapstone@gmail.com>
Should make it possible to track movements between state lists
This will break the state merging plugin (but I'll fix it eventually)
Haven't been able to figure out why, but somehow other loggers get "stuck" at this high verbosity and the integration tests try to print out the values of every single register.
This builds heavily on top of #1775, so that will need to be merged first, but pending that it's ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far! I'm hoping we can have the protobuf compiler generate the serialization file during installation though. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been sitting open for a while, so to make it easier to review I added a couple of comments pointing to parts that I think might be controversial.
@@ -134,20 +134,3 @@ def test_integration_basic_stdin(self): | |||
else: | |||
self.assertTrue(a <= 0x41) | |||
self.assertTrue(b > 0x41) | |||
|
|||
|
|||
class ManticoreLogger(unittest.TestCase): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@feliam I moved this from this file over to test_logging.py
in order to avoid the problem where the log level gets stuck at the max level. I seem to recall you having dealt with something similar, but I can't remember where. Did you come up with a better solution?
server.dump = dump_states # type: ignore | ||
server.serve_forever() | ||
except OSError as e: | ||
# TODO - this should be logger.warning, but we need to rewrite several unit tests that depend on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@feliam Do you think it's worth fixing this in this PR, or should we do a more general rewrite of the tests separately?
A lot of our tests check for exact stdout output, which can be brittle if you want to add new logging messages. Maybe it'd be better to check that the lines we're looking for are contained in the output the correct number of times?
Per our discussion at the dev meeting, since this has been sitting unchanged for roughly a month and no one has had the cycles to fully review it, I'm going to merge it as-is (and take the flak if it breaks). |
* master: (43 commits) Syscall specific hooks (#2389) TUI Support Infrastructure (#1620) Fix coveralls upload (#2387) docs: fix simple typo, straigth -> straight (#2381) Attempt to allow symbolic balances from the start (#1818) Fix state.cpu.PC member (#1825) Bump black and mypy (#1824) Manticore 0.3.5 (#1808) Fix yices timeout argument (#1817) Detect default solver (#1820) Ignore Gas Calculations by Default (#1816) native/cpu/x86: Add support for CPUID EAX=80000000h (#1811) Change types.FunctionType=<class 'function'> (#1803) Fix test regressions (#1804) State Introspection API (#1775) Fix EVM account existence checks for selfdestruct and call (#1801) Add partial implementation of sendto syscall (#1791) crytic-compile: use latest release (#1795) Update gas metering for calls to empty accounts (#1774) Fix BitVec with symbolic offset and fix TranslatorSmtlib.unique thread safety (#1792) ...
* master: Removed use of global solver from Native Memory (#2414) Support to use boolector as the SMT solver (#2410) Update CI and suggest to use pip3 instead of pip (#2409) Expressions use keyword-only arguments for init (#2395) Use Slots on all Expression objects (#2394) Allow double-adding exact same config option (#2397) Don't run OSX tests on PR Attempt to Fix solc Installation MacOS (#2392) Syscall specific hooks (#2389) TUI Support Infrastructure (#1620) Fix coveralls upload (#2387) docs: fix simple typo, straigth -> straight (#2381) Attempt to allow symbolic balances from the start (#1818) Fix state.cpu.PC member (#1825) Bump black and mypy (#1824)
* master: (22 commits) Fix the generation of EVM tests (#2426) Disabled EVM events in testcases by default (#2417) added proper timeouts for cvc4 and boolector (#2418) Removed use of global solver from Native Memory (#2414) Support to use boolector as the SMT solver (#2410) Update CI and suggest to use pip3 instead of pip (#2409) Expressions use keyword-only arguments for init (#2395) Use Slots on all Expression objects (#2394) Allow double-adding exact same config option (#2397) Don't run OSX tests on PR Attempt to Fix solc Installation MacOS (#2392) Syscall specific hooks (#2389) TUI Support Infrastructure (#1620) Fix coveralls upload (#2387) docs: fix simple typo, straigth -> straight (#2381) Attempt to allow symbolic balances from the start (#1818) Fix state.cpu.PC member (#1825) Bump black and mypy (#1824) Manticore 0.3.5 (#1808) Fix yices timeout argument (#1817) ...
Adds preliminary support for the TUI to Manticore. Lots of limitations and shortcomings right now. In no particular order: