File tree 3 files changed +19
-4
lines changed
3 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 26
26
27
27
#include " symex_target.h"
28
28
29
- class dirtyt ;
29
+ class incremental_dirtyt ;
30
30
31
31
// central data structure: state
32
32
class goto_symex_statet final
@@ -340,9 +340,12 @@ class goto_symex_statet final
340
340
bool l2_thread_read_encoding (ssa_exprt &expr, const namespacet &ns);
341
341
bool l2_thread_write_encoding (const ssa_exprt &expr, const namespacet &ns);
342
342
343
+ void populate_dirty_for_function (
344
+ const irep_idt &id, const goto_functionst::goto_functiont &);
345
+
343
346
void switch_to_thread (unsigned t);
344
347
bool record_events;
345
- std::unique_ptr<const dirtyt > dirty;
348
+ std::unique_ptr<incremental_dirtyt > dirty;
346
349
};
347
350
348
351
#endif // CPROVER_GOTO_SYMEX_GOTO_SYMEX_STATE_H
Original file line number Diff line number Diff line change @@ -235,6 +235,9 @@ void goto_symext::symex_function_call_code(
235
235
236
236
const goto_functionst::goto_functiont &goto_function=it->second ;
237
237
238
+ if (state.dirty )
239
+ state.dirty ->populate_dirty_for_function (identifier, goto_function);
240
+
238
241
const bool stop_recursing=get_unwind_recursion (
239
242
identifier,
240
243
state.source .thread_nr ,
Original file line number Diff line number Diff line change @@ -136,8 +136,17 @@ void goto_symext::initialize_entry_point(
136
136
state.top ().end_of_function =limit;
137
137
state.top ().calling_location .pc =state.top ().end_of_function ;
138
138
state.symex_target =⌖
139
- state.dirty =util_make_unique<dirtyt>(goto_functions);
140
-
139
+ state.dirty =util_make_unique<incremental_dirtyt>();
140
+ if (!pc->function .empty ())
141
+ {
142
+ state.dirty ->populate_dirty_for_function (
143
+ pc->function , goto_functions.function_map .at (pc->function ));
144
+ }
145
+ else
146
+ {
147
+ log .warning () << " Unable to analyse address-taken locals, as start "
148
+ " instruction does not state its function" << messaget::eom;
149
+ }
141
150
symex_transition (state, state.source .pc );
142
151
}
143
152
You can’t perform that action at this time.
0 commit comments