Skip to content

Commit d475abc

Browse files
committed
Reset namespace after symbolic execution
The state's symbol table may go out of scope, leaving the namespace with a dangling pointer. This is a follow-up to e8eec2c.
1 parent b804570 commit d475abc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/goto-symex/symex_main.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ void goto_symext::symex_with_state(
208208
// execution, so return the names generated through symbolic execution
209209
// through `new_symbol_table`.
210210
new_symbol_table = state.symbol_table;
211+
// reset the namespace back to a sane state as state.symbol_table might go out
212+
// of scope
213+
ns = namespacet(outer_symbol_table);
211214
}
212215

213216
void goto_symext::resume_symex_from_saved_state(

0 commit comments

Comments
 (0)