File tree Expand file tree Collapse file tree 3 files changed +35
-1
lines changed
regression/goto-analyzer/variable-sensitivity-dependence-graph-merge
src/analyses/variable-sensitivity Expand file tree Collapse file tree 3 files changed +35
-1
lines changed Original file line number Diff line number Diff line change
1
+ void cal (void )
2
+ {
3
+
4
+ }
5
+
6
+ const int g_N = 5 ;
7
+ int x = 0 ;
8
+
9
+ struct {
10
+ int idx ;
11
+ } s_str = { 0 };
12
+
13
+ void main (void )
14
+ {
15
+ for (int i = 0 ; i < g_N ; i ++ ) {
16
+ cal ();
17
+ s_str .idx = s_str .idx + 1 ;
18
+ }
19
+
20
+ __CPROVER_assert (s_str .idx > 1 , "s_str.idx > 1" );
21
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ main.c
3
+ --dependence-graph-vs --structs --arrays --verify
4
+ EXIT=0
5
+ SIGNAL=0
6
+ ^\[main.assertion.1\] file .* function main, idx==1: Unknown$
7
+ --
Original file line number Diff line number Diff line change @@ -228,7 +228,13 @@ abstract_object_pointert data_dependency_contextt::merge(
228
228
std::inserter (result->data_dominators , result->data_dominators .end ()),
229
229
location_ordert ());
230
230
231
- return result;
231
+ // It is critically important that we only return a newly constructed result
232
+ // abstract object *iff* the data has actually changed, otherwise AI may
233
+ // never reach a fixpoint
234
+ if (has_been_modified (result))
235
+ return result;
236
+ else
237
+ return shared_from_this ();
232
238
}
233
239
234
240
return abstract_objectt::merge (other);
You can’t perform that action at this time.
0 commit comments