···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
88- List.iter ~f:(fun (i, v) -> t.(i) <- v) marks;
88+ let set (i, v) = t.(i) <- v in
99+ List.iter ~f:set marks;
910 t
1011;;
1112
+2-7
lib/pmark.ml
···3344 let equal (x : int) (y : int) = x = y
55 let compare (x : int) (y : int) = compare x y
66- let r = ref 0
77-88- let gen () =
99- incr r;
1010- !r
1111- ;;
1212-66+ let r = Atomic.make 1
77+ let gen () = Atomic.fetch_and_add r 1
138 let pp = Format.pp_print_int
149end
1510
+4
lib_test/concurrency/suppress.txt
···16161717# Race within Compile.final
1818race_top:^camlRe__Compile.final
1919+2020+# Spurious data race due to the two-step initialization in Mark_info.make
2121+# (between Mark_info.make and other functions in module Mark_infos)
2222+race_top:^camlRe__Mark_infos.set
+6-2
lib_test/concurrency/test.ml
···8181 (inverse_permutation a)
8282 (Array.map
8383 (fun i ->
8484- try Some (Re.exec ~pos:(if short then 30 - 7 else 0) re strings.(i)) with
8484+ try
8585+ Some
8686+ (Re.Group.all_offset
8787+ @@ Re.exec ~pos:(if short then 30 - 7 else 0) re strings.(i))
8888+ with
8589 | Not_found -> None)
8690 a)
8791;;
88928989-let compare_groups g g' = Re.Group.(all_offset g = all_offset g')
9393+let compare_groups g g' = g = g'
90949195let concurrent f f' =
9296 let barrier = Barrier.create 2 in