File tree Expand file tree Collapse file tree 4 files changed +14
-10
lines changed Expand file tree Collapse file tree 4 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ type t = int array
55let make marks =
66 let len = 1 + List. fold_left ~f: (fun ma (i , _ ) -> max ma i) ~init: (- 1 ) marks in
77 let t = Array. make len (- 1 ) in
8- List. iter ~f: (fun (i , v ) -> t.(i) < - v) marks;
8+ let set (i , v ) = t.(i) < - v in
9+ List. iter ~f: set marks;
910 t
1011;;
1112
Original file line number Diff line number Diff line change @@ -3,13 +3,8 @@ module Pmark = struct
33
44 let equal (x : int ) (y : int ) = x = y
55 let compare (x : int ) (y : int ) = compare x y
6- let r = ref 0
7-
8- let gen () =
9- incr r;
10- ! r
11- ;;
12-
6+ let r = Atomic. make 1
7+ let gen () = Atomic. fetch_and_add r 1
138 let pp = Format. pp_print_int
149end
1510
Original file line number Diff line number Diff line change @@ -16,3 +16,7 @@ race_top:^camlRe__Automata.status
1616
1717# Race within Compile.final
1818race_top:^camlRe__Compile.final
19+
20+ # Spurious data race due to the two-step initialization in Mark_info.make
21+ # (between Mark_info.make and other functions in module Mark_infos)
22+ race_top:^camlRe__Mark_infos.set
Original file line number Diff line number Diff line change @@ -81,12 +81,16 @@ let execute ~short re a =
8181 (inverse_permutation a)
8282 (Array. map
8383 (fun i ->
84- try Some (Re. exec ~pos: (if short then 30 - 7 else 0 ) re strings.(i)) with
84+ try
85+ Some
86+ (Re.Group. all_offset
87+ @@ Re. exec ~pos: (if short then 30 - 7 else 0 ) re strings.(i))
88+ with
8589 | Not_found -> None )
8690 a)
8791;;
8892
89- let compare_groups g g' = Re.Group. (all_offset g = all_offset g')
93+ let compare_groups g g' = g = g'
9094
9195let concurrent f f' =
9296 let barrier = Barrier. create 2 in
You can’t perform that action at this time.
0 commit comments