Skip to content

Commit e4ab634

Browse files
committed
Merge branch 'master' into unboxed
2 parents be69a34 + 69f28b2 commit e4ab634

File tree

103 files changed

+1233
-974
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+1233
-974
lines changed

conf/ldv-races.json

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929
"escape",
3030
"expRelation",
3131
"mhp",
32-
"assert"
32+
"assert",
33+
"var_eq",
34+
"symb_locks"
3335
],
3436
"malloc": {
3537
"wrappers": [
@@ -52,6 +54,19 @@
5254
]
5355
}
5456
},
57+
"lib": {
58+
"activated": [
59+
"c",
60+
"posix",
61+
"pthread",
62+
"gcc",
63+
"glibc",
64+
"linux-userspace",
65+
"goblint",
66+
"ncurses",
67+
"klever"
68+
]
69+
},
5570
"witness": {
5671
"graphml": {
5772
"enabled": true,

conf/min-unsound.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"ana": {
3+
"activated": [
4+
]
5+
}
6+
}

docs/developer-guide/debugging.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ This will create a file called `goblint.byte`.
6060
### Debugging Goblint with VS Code
6161

6262
To debug OCaml programs, you can use the command line interface of `ocamldebug` or make use of the Visual Studio Code
63-
integration provided by `hackwaly.ocamlearlybird`.
63+
integration provided by `ocamllabs.ocaml-platform`.
6464
In the following, we describe the steps necessary to set up this VS Code extension to
6565
debug Goblint.
6666

6767
### Setting-up Earlybird
6868

69-
Install the [`hackwaly.ocamlearlybird` extension](https://marketplace.visualstudio.com/items?itemName=hackwaly.ocamlearlybird) in your installation of Visual Studio Code.
70-
To be able to use this extension, you additionally need to install `ocamlearlybird` on the opam switch you use for Goblint.
69+
Install the [`ocamllabs.ocaml-platform` extension](https://marketplace.visualstudio.com/items?itemName=ocamllabs.ocaml-platform) in your installation of Visual Studio Code.
70+
To be able to use this extension, you additionally need to install `earlybird` on the opam switch you use for Goblint.
7171
To do so, run the following command in the `analyzer` directory:
7272

7373
```console
@@ -76,7 +76,7 @@ opam install earlybird
7676

7777
### Providing a Launch Configuration
7878

79-
To let the `hackwaly.ocamlearlybird` extension know which executable it should debug, and which arguments it should pass, we have to provide a configuration file.
79+
To let the `ocamllabs.ocaml-platform` extension know which executable it should debug, and which arguments it should pass, we have to provide a configuration file.
8080
The configuration file has to be named `launch.json` and must reside in the `./.vscode` directory. Here is an example `launch.json`:
8181

8282
```JSON
@@ -92,6 +92,9 @@ The configuration file has to be named `launch.json` and must reside in the `./.
9292
"tests/regression/00-sanity/01-assert.c",
9393
"--enable", "ana.int.interval",
9494
],
95+
"env": {
96+
"LD_LIBRARY_PATH": "$LD_LIBRARY_PATH:_build/default/src/common"
97+
},
9598
"stopOnEntry": false,
9699
}
97100
]

docs/developer-guide/messaging.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ A message consists of the following:
1818
3. **Context.** Optional. Currently completely abstract, so not very useful.
1919
* **Group.** For messages related to numerous locations with different texts. Contains the following:
2020
1. **Group text.** An overall description of the group message.
21-
2. **Pieces.** A list of single messages as described above.
21+
2. **Group location.** Optional. An overall location of the group message.
22+
3. **Pieces.** A list of single messages as described above.
2223

2324
## Creating
2425

dune-project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
(homepage "https://goblint.in.tum.de")
1717
(documentation "https://goblint.readthedocs.io/en/latest/")
1818
(authors "Simmo Saan" "Michael Schwarz" "Julian Erhard" "Sarah Tilscher" "Ralf Vogler" "Kalmer Apinis" "Vesal Vojdani" ) ; same authors as in .zenodo.json and CITATION.cff
19-
(maintainers "Simmo Saan <[email protected]>" "Michael Schwarz <[email protected]>")
19+
(maintainers "Simmo Saan <[email protected]>" "Michael Schwarz <[email protected]>" "Karoliine Holter")
2020
(license MIT)
2121

2222
(package

goblint.opam

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ synopsis: "Static analysis framework for C"
44
maintainer: [
55
"Simmo Saan <[email protected]>"
66
"Michael Schwarz <[email protected]>"
7+
"Karoliine Holter"
78
]
89
authors: [
910
"Simmo Saan"

goblint.opam.locked

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ synopsis: "Static analysis framework for C"
55
maintainer: [
66
"Simmo Saan <[email protected]>"
77
"Michael Schwarz <[email protected]>"
8+
"Karoliine Holter"
89
]
910
authors: [
1011
"Simmo Saan"

gobview

scripts/goblint-lib-modules.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
goblint_lib_paths = [
1010
src_root_path / "goblint_lib.ml",
11+
src_root_path / "solver" / "goblint_solver.ml",
1112
src_root_path / "util" / "std" / "goblint_std.ml",
1213
]
1314
goblint_lib_modules = set()
@@ -33,6 +34,7 @@
3334

3435
# libraries
3536
"Goblint_std",
37+
"Goblint_solver",
3638
"Goblint_timing",
3739
"Goblint_backtrace",
3840
"Goblint_tracing",
@@ -63,5 +65,5 @@
6365

6466
missing_modules = src_modules - goblint_lib_modules
6567
if len(missing_modules) > 0:
66-
print(f"Modules missing from {goblint_lib_path}: {missing_modules}")
68+
print(f"Modules missing from {goblint_lib_paths[0]}: {missing_modules}")
6769
sys.exit(1)

src/analyses/apron/relationPriv.apron.ml

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ struct
843843
end
844844

845845
(** Per-mutex meet with TIDs. *)
846-
module PerMutexMeetPrivTID (Cluster: ClusterArg): S = functor (RD: RelationDomain.RD) ->
846+
module PerMutexMeetPrivTID (Digest: Digest) (Cluster: ClusterArg): S = functor (RD: RelationDomain.RD) ->
847847
struct
848848
open CommonPerMutex(RD)
849849
include MutexGlobals
@@ -853,21 +853,17 @@ struct
853853
module Cluster = NC
854854
module LRD = NC.LRD
855855

856-
include PerMutexTidCommon(struct
857-
let exclude_not_started () = GobConfig.get_bool "ana.relation.priv.not-started"
858-
let exclude_must_joined () = GobConfig.get_bool "ana.relation.priv.must-joined"
859-
end)(LRD)
856+
include PerMutexTidCommon (Digest) (LRD)
860857

861858
module AV = RD.V
862859
module P = UnitP
863860

864861
let name () = "PerMutexMeetPrivTID(" ^ (Cluster.name ()) ^ (if GobConfig.get_bool "ana.relation.priv.must-joined" then ",join" else "") ^ ")"
865862

866863
let get_relevant_writes (ask:Q.ask) m v =
867-
let current = ThreadId.get_current ask in
868-
let must_joined = ask.f Queries.MustJoinedThreads in
864+
let current = Digest.current ask in
869865
GMutex.fold (fun k v acc ->
870-
if compatible ask current must_joined k then
866+
if not (Digest.accounted_for ask ~current ~other:k) then
871867
LRD.join acc (Cluster.keep_only_protected_globals ask m v)
872868
else
873869
acc
@@ -945,8 +941,8 @@ struct
945941
(* unlock *)
946942
let rel_side = RD.keep_vars rel_local [g_var] in
947943
let rel_side = Cluster.unlock (W.singleton g) rel_side in
948-
let tid = ThreadId.get_current ask in
949-
let sidev = GMutex.singleton tid rel_side in
944+
let digest = Digest.current ask in
945+
let sidev = GMutex.singleton digest rel_side in
950946
sideg (V.global g) (G.create_global sidev);
951947
let l' = L.add lm rel_side l in
952948
let rel_local' =
@@ -983,8 +979,8 @@ struct
983979
else
984980
let rel_side = keep_only_protected_globals ask m rel in
985981
let rel_side = Cluster.unlock w rel_side in
986-
let tid = ThreadId.get_current ask in
987-
let sidev = GMutex.singleton tid rel_side in
982+
let digest = Digest.current ask in
983+
let sidev = GMutex.singleton digest rel_side in
988984
sideg (V.mutex m) (G.create_mutex sidev);
989985
let lm = LLock.mutex m in
990986
let l' = L.add lm rel_side l in
@@ -1068,8 +1064,8 @@ struct
10681064
in
10691065
let rel_side = RD.keep_vars rel g_vars in
10701066
let rel_side = Cluster.unlock (W.top ()) rel_side in (* top W to avoid any filtering *)
1071-
let tid = ThreadId.get_current ask in
1072-
let sidev = GMutex.singleton tid rel_side in
1067+
let digest = Digest.current ask in
1068+
let sidev = GMutex.singleton digest rel_side in
10731069
sideg V.mutex_inits (G.create_mutex sidev);
10741070
(* Introduction into local state not needed, will be read via initializer *)
10751071
(* Also no side-effect to mutex globals needed, the value here will either by read via the initializer, *)
@@ -1207,11 +1203,11 @@ let priv_module: (module S) Lazy.t =
12071203
| "protection" -> (module ProtectionBasedPriv (struct let path_sensitive = false end))
12081204
| "protection-path" -> (module ProtectionBasedPriv (struct let path_sensitive = true end))
12091205
| "mutex-meet" -> (module PerMutexMeetPriv)
1210-
| "mutex-meet-tid" -> (module PerMutexMeetPrivTID (NoCluster))
1211-
| "mutex-meet-tid-cluster12" -> (module PerMutexMeetPrivTID (DownwardClosedCluster (Clustering12)))
1212-
| "mutex-meet-tid-cluster2" -> (module PerMutexMeetPrivTID (ArbitraryCluster (Clustering2)))
1213-
| "mutex-meet-tid-cluster-max" -> (module PerMutexMeetPrivTID (ArbitraryCluster (ClusteringMax)))
1214-
| "mutex-meet-tid-cluster-power" -> (module PerMutexMeetPrivTID (DownwardClosedCluster (ClusteringPower)))
1206+
| "mutex-meet-tid" -> (module PerMutexMeetPrivTID (ThreadDigest) (NoCluster))
1207+
| "mutex-meet-tid-cluster12" -> (module PerMutexMeetPrivTID (ThreadDigest) (DownwardClosedCluster (Clustering12)))
1208+
| "mutex-meet-tid-cluster2" -> (module PerMutexMeetPrivTID (ThreadDigest) (ArbitraryCluster (Clustering2)))
1209+
| "mutex-meet-tid-cluster-max" -> (module PerMutexMeetPrivTID (ThreadDigest) (ArbitraryCluster (ClusteringMax)))
1210+
| "mutex-meet-tid-cluster-power" -> (module PerMutexMeetPrivTID (ThreadDigest) (DownwardClosedCluster (ClusteringPower)))
12151211
| _ -> failwith "ana.relation.privatization: illegal value"
12161212
)
12171213
in

0 commit comments

Comments
 (0)