Skip to content

Commit d61001a

Browse files
authored
Merge pull request #6120 from tautschnig/concurrency-function-name
Concurrency: ensure function name is correct when starting threads
2 parents 51b3944 + e093124 commit d61001a

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

src/goto-symex/goto_symex_state.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ class goto_symex_statet final : public goto_statet
182182
struct threadt
183183
{
184184
goto_programt::const_targett pc;
185+
irep_idt function_id;
185186
guardt guard;
186187
call_stackt call_stack;
187188
std::map<irep_idt, unsigned> function_frame;

src/goto-symex/symex_main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ switch_to_thread(goto_symex_statet &state, const unsigned int thread_nb)
290290
// get new PC
291291
state.source.thread_nr = thread_nb;
292292
state.source.pc = state.threads[thread_nb].pc;
293+
state.source.function_id = state.threads[thread_nb].function_id;
293294

294295
state.guard = state.threads[thread_nb].guard;
295296
// A thread's initial state is certainly reachable:

src/goto-symex/symex_start_thread.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ void goto_symext::symex_start_thread(statet &state)
4545
// statet::threadt &cur_thread=state.threads[state.source.thread_nr];
4646
statet::threadt &new_thread=state.threads.back();
4747
new_thread.pc=thread_target;
48+
new_thread.function_id = state.source.function_id;
4849
new_thread.guard=state.guard;
4950
new_thread.call_stack.push_back(state.call_stack().top());
5051
new_thread.call_stack.back().local_objects.clear();

0 commit comments

Comments
 (0)