From 1f612067183369621d089cbe885346078dcf6c28 Mon Sep 17 00:00:00 2001 From: Dirk Beyer Date: Sat, 9 Dec 2023 20:58:59 +0100 Subject: [PATCH] Fix an 'IndexError: list index out of range' in tool-info module for WitnessLint --- benchexec/tools/witnesslint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchexec/tools/witnesslint.py b/benchexec/tools/witnesslint.py index 2422e4206..995550710 100644 --- a/benchexec/tools/witnesslint.py +++ b/benchexec/tools/witnesslint.py @@ -43,7 +43,7 @@ def determine_result(self, run): witness_version_match = self.get_value_from_output( run.output, "Witness Version-Match" ) - if "witnesslint finished" not in run.output[-1] or exit_code == 7: + if len(run.output) == 0 or "witnesslint finished" not in run.output[-1] or exit_code == 7: return "EXCEPTION" elif exit_code == 1: return result.RESULT_ERROR + " (invalid witness syntax)"