File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -174,7 +174,10 @@ module MallocWrapper : MCPSpec = struct
174
174
| Some (t , _ , c ) -> UniqueCount. is_top c ||
175
175
(match t with
176
176
| `Lifted tid -> not (Thread. is_unique tid)
177
- | _ -> true )
177
+ | _ ->
178
+ (* The thread analysis may be completely disabled; in this case we fall back on checking whether the program has been single threaded since start *)
179
+ not (man.ask (Q. MustBeSingleThreaded {since_start = true }))
180
+ )
178
181
| None -> false
179
182
end
180
183
| _ -> Queries.Result. top q
Original file line number Diff line number Diff line change
1
+ // PARAM: --set ana.malloc.unique_address_count 1 --set ana.autotune.activated '["reduceAnalyses"]' --enable ana.autotune.enabled
2
+ #include <pthread.h>
3
+ #include <goblint.h>
4
+
5
+ int main (int argc , char * argv []) {
6
+ int * ptr = (int * )malloc (sizeof (int ));
7
+ * ptr = 8 ;
8
+ * ptr = 5 ;
9
+
10
+ __goblint_check (* ptr == 5 );
11
+
12
+ return 0 ;
13
+ }
You can’t perform that action at this time.
0 commit comments