-
Notifications
You must be signed in to change notification settings - Fork 470
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
Basic solver stats #2415
Basic solver stats #2415
Conversation
manticore/core/manticore.py
Outdated
context["time_ended"] = time_ended | ||
context["time_elapsed"] = time_elapsed | ||
else: | ||
logger.info("Warning: manticore failed to run") |
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.
- See above re: info/warning disconnect
- "Manticore failed to run" seems a little bit aggressive. Maybe "Run start time not found in context. Was
save_run_data
called without callingrun
?"
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.
The log level for this was changed to warning
. This error will happen if you provide manticore with incorrect binary code or bytecode. Typically, when a smart contract is not properly compiled. Right now, this is output:
2021-04-06 09:15:54,463: [13997] m.c.manticore:INFO: Generated testcase No. 0 - NO STATE RESULT (?)(0 txs)
2021-04-06 09:15:54,464: [13997] m.c.plugin:WARNING: Caught will_solve in state None, but failed to capture its initialization
2021-04-06 09:15:54,475: [13984] m.c.manticore:INFO: Results in /home/g/Data/manticore-benchmarks/mcore_mkg0pep9
Here manticore does not provide any good feedback that it failed to run beyond the "NO STATE RESULT (?)", that's why "Manticore failed to run" can be appropriated (but I'm open to suggestions).
* master: Install pinned version of truffle to fix CI (#2467) Use fixed owner and attacker accounts in multi_tx_analysis (#2464) Manticore 0.3.6 (#2456) Fix IntrospectionAPIPlugin Name (#2459) Portfolio of parallel solvers (#2420) Replace Quick mode with Thorough mode (#2457) Fix incorrect comparison for symbolic file wildcards (#2454) Reduce the number of calls to the SMT solver in EVM (#2411) Fixes to Unicorn emulation - start/stop/resume (#1796) Add support for multiple compilation units (#2444) Basic solver stats (#2415)
* master: (35 commits) Track last_pc in StateDescriptors (#2471) Expose Result Register for Native CPU (#2470) Install pinned version of truffle to fix CI (#2467) Use fixed owner and attacker accounts in multi_tx_analysis (#2464) Manticore 0.3.6 (#2456) Fix IntrospectionAPIPlugin Name (#2459) Portfolio of parallel solvers (#2420) Replace Quick mode with Thorough mode (#2457) Fix incorrect comparison for symbolic file wildcards (#2454) Reduce the number of calls to the SMT solver in EVM (#2411) Fixes to Unicorn emulation - start/stop/resume (#1796) Add support for multiple compilation units (#2444) Basic solver stats (#2415) 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) ...
This small PR includes a global dictionary that keeps tracks of when each solver is used succefully, timeouts or returns unknown. At the end, the result will be saved in a plain text file called
global.solver_stats
. If the solver returned either timeout or unknown, the user will be warned about it.