Skip to content

Commit

Permalink
Merge branch 'svcomp24-conf' into pldi-bench
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed Oct 9, 2023
2 parents 0af8ba7 + 94307d0 commit e4bf5ac
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
15 changes: 14 additions & 1 deletion conf/svcomp.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@
"thread",
"threadJoins"
],
"path_sens": [
"mutex",
"malloc_null",
"uninit",
"expsplit",
"activeSetjmp",
"threadid"
],
"context": {
"widen": false
},
Expand All @@ -52,14 +60,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
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; _} =
false (* two read/read accesses do not race *)
else if not (get_bool "ana.race.free") && (kind = Free || kind2 = Free) then
false
else if not (get_bool "ana.race.call") && (kind = Call || kind2 = Call) then
false
else if not (MCPAccess.A.may_race acc acc2) then
false (* analysis-specific information excludes race *)
else
Expand Down
9 changes: 9 additions & 0 deletions src/maingoblint.ml
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,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
6 changes: 6 additions & 0 deletions src/util/options.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,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

0 comments on commit e4bf5ac

Please sign in to comment.