From 0fa906d012ccdc4391ff20c5d54dabe794287162 Mon Sep 17 00:00:00 2001 From: Eric Kilmer Date: Fri, 9 Jul 2021 09:24:55 -0400 Subject: [PATCH] Kill Manticore if _any_ state encounters unrecoverable exception This is useful for CHESS because we of how Manticore tasks are killed through signals. Previously, a signal/exception is caught by the current active state and then printed. This is an issue because if there is more than one state, Manticore doesn't actually die when we want. This change now kills Manticore when _any_ state encounters an unrecoverable exception or assertion and operates as we expect upon a death signal. In the future, when upstreaming this branhc, we probably want to make this opt-in to preserve previous functionality expectations. --- manticore/core/worker.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/manticore/core/worker.py b/manticore/core/worker.py index 5da1fa436..638b30d5c 100644 --- a/manticore/core/worker.py +++ b/manticore/core/worker.py @@ -188,6 +188,9 @@ def run(self, *args): m._kill_state(current_state.id) m._publish("did_kill_state", current_state, exc) current_state = None + # Kill Manticore if _any_ state encounters unrecoverable + # exception/assertion + m.kill() break # Getting out.