Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion conf/svcomp.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@
"thread",
"threadJoins"
],
"path_sens": [
"mutex",
"malloc_null",
"uninit",
"expsplit",
"activeSetjmp",
"memLeak",
"threadflag"
],
"context": {
"widen": false
},
Expand All @@ -52,14 +61,19 @@

"ldv_xmalloc",
"ldv_xzalloc",
"ldv_calloc"
"ldv_calloc",
"ldv_kzalloc"
]
},
"base": {
"arrays": {
"domain": "partitioned"
}
},
"race": {
"free": false,
"call": false
},
"autotune": {
"enabled": true,
"activated": [
Expand Down
6 changes: 6 additions & 0 deletions src/common/util/options.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1008,6 +1008,12 @@
"type": "boolean",
"default": true
},
"call": {
"title": "ana.race.call",
"description": "Report races for thread-unsafe function calls.",
"type": "boolean",
"default": true
},
"direct-arithmetic": {
"title": "ana.race.direct-arithmetic",
"description": "Collect and distribute direct (i.e. not in a field) accesses to arithmetic types.",
Expand Down
2 changes: 2 additions & 0 deletions src/domains/access.ml
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,8 @@ let may_race A.{kind; acc; _} A.{kind=kind2; acc=acc2; _} =
| Read, Read -> false (* two read/read accesses do not race *)
| Free, _
| _, Free when not (get_bool "ana.race.free") -> false
| Call, _
| _, Call when not (get_bool "ana.race.call") -> false
| _, _ -> MCPAccess.A.may_race acc acc2 (* analysis-specific information excludes race *)

(** Access sets for race detection and warnings. *)
Expand Down
9 changes: 9 additions & 0 deletions src/maingoblint.ml
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,15 @@ let preprocess_files () =
(* Preprocessor flags *)
let cppflags = ref (get_string_list "pre.cppflags") in

if get_bool "ana.sv-comp.enabled" then (
let architecture_flag = match get_string "exp.architecture" with
| "32bit" -> "-m32"
| "64bit" -> "-m64"
| _ -> assert false
in
cppflags := architecture_flag :: !cppflags
);

(* the base include directory *)
(* TODO: any better way? dune executable promotion doesn't add _build sites *)
let source_lib_dirs =
Expand Down