@@ -25,8 +25,6 @@ symex_bmct::symex_bmct(
25
25
path_storaget &path_storage)
26
26
: goto_symext(mh, outer_symbol_table, _target, path_storage),
27
27
record_coverage(false ),
28
- max_unwind(0 ),
29
- max_unwind_is_set(false ),
30
28
symex_coverage(ns)
31
29
{
32
30
}
@@ -131,25 +129,12 @@ bool symex_bmct::get_unwind(
131
129
// / --unwind options to decide:
132
130
if (abort_unwind_decision.is_unknown ())
133
131
{
134
- // We use the most specific limit we have,
135
- // and 'infinity' when we have none.
132
+ auto limit=unwindset.get_limit (id, source.thread_nr );
136
133
137
- loop_limitst &this_thread_limits=
138
- thread_loop_limits[source.thread_nr ];
139
-
140
- loop_limitst::const_iterator l_it=this_thread_limits.find (id);
141
- if (l_it!=this_thread_limits.end ())
142
- this_loop_limit=l_it->second ;
134
+ if (!limit.has_value ())
135
+ abort_unwind_decision = tvt (false );
143
136
else
144
- {
145
- l_it=loop_limits.find (id);
146
- if (l_it!=loop_limits.end ())
147
- this_loop_limit=l_it->second ;
148
- else if (max_unwind_is_set)
149
- this_loop_limit=max_unwind;
150
- }
151
-
152
- abort_unwind_decision = tvt (unwind >= this_loop_limit);
137
+ abort_unwind_decision = tvt (unwind >= *limit);
153
138
}
154
139
155
140
INVARIANT (
@@ -187,25 +172,12 @@ bool symex_bmct::get_unwind_recursion(
187
172
// / --unwind options to decide:
188
173
if (abort_unwind_decision.is_unknown ())
189
174
{
190
- // We use the most specific limit we have,
191
- // and 'infinity' when we have none.
192
-
193
- loop_limitst &this_thread_limits=
194
- thread_loop_limits[thread_nr];
175
+ auto limit=unwindset.get_limit (id, thread_nr);
195
176
196
- loop_limitst::const_iterator l_it=this_thread_limits.find (id);
197
- if (l_it!=this_thread_limits.end ())
198
- this_loop_limit=l_it->second ;
177
+ if (!limit.has_value ())
178
+ abort_unwind_decision = tvt (false );
199
179
else
200
- {
201
- l_it=loop_limits.find (id);
202
- if (l_it!=loop_limits.end ())
203
- this_loop_limit=l_it->second ;
204
- else if (max_unwind_is_set)
205
- this_loop_limit=max_unwind;
206
- }
207
-
208
- abort_unwind_decision = tvt (unwind>this_loop_limit);
180
+ abort_unwind_decision = tvt (unwind > *limit);
209
181
}
210
182
211
183
INVARIANT (
0 commit comments