Skip to content

Commit

Permalink
Add support for ENV threads ending
Browse files Browse the repository at this point in the history
ENV artifitial thread may end in an error trace before the violation
  • Loading branch information
vmordan committed Jun 27, 2024
1 parent d9aedea commit 56bb0b0
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions scripts/mea/et/internal_witness.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,11 +547,20 @@ def final_checks(self, entry_point="main"):
is_main_process = False
if self._env_threads:
cur_thread = 0
threads = []
for edge in self._edges:
if edge['file'] in self._env_threads:
if 'enter' in edge and edge['enter'] in self._env_threads[edge['file']]:
cur_thread = self._env_threads[edge['file']][edge['enter']]
if edge['file'] in self._env_threads and 'enter' in edge \
and edge['enter'] in self._env_threads[edge['file']]:
threads.append(cur_thread)
cur_thread = self._env_threads[edge['file']][edge['enter']]
edge['thread'] = cur_thread
if edge['file'] in self._env_threads and 'return' in edge and \
edge['return'] in self._env_threads[edge['file']]:
if threads:
cur_thread = threads.pop()
else:
self._logger.warning(
f"Threads stack is empty, but we got a return to previous thread at {edge}")
else:
for edge in self._edges:
if not is_main_process and 'enter' in edge:
Expand Down

0 comments on commit 56bb0b0

Please sign in to comment.