Skip to content

Commit 070c9a8

Browse files
committed
CI: run the tests using TSan
1 parent a35565d commit 070c9a8

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,16 @@ jobs:
1414
ocaml-compiler:
1515
- "4.14"
1616
- "5.2"
17+
include:
18+
- os: ubuntu-24.04-arm
19+
ocaml-compiler: "ocaml-variants.5.2.1+options,ocaml-option-tsan"
1720
runs-on: ${{ matrix.os }}
1821
steps:
1922
- uses: actions/checkout@v4
23+
- run: |
24+
sudo apt update
25+
sudo apt install libunwind-dev
26+
if: ${{ matrix.os == 'ubuntu-24.04-arm' }}
2027
- uses: ocaml/setup-ocaml@v3
2128
with:
2229
ocaml-compiler: ${{ matrix.ocaml-compiler }}

lib_test/concurrency/dune

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
(>= %{ocaml_version} 5.0))
55
(action
66
(pipe-outputs
7-
(run %{test})
7+
(setenv
8+
TSAN_OPTIONS
9+
suppressions=suppress.txt
10+
(run %{test}))
811
(run cat)))
12+
(deps suppress.txt)
913
(libraries re))

lib_test/concurrency/suppress.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
# Data race between Compile.State.follow_transition (inlined in Compile.next)
3+
# and Compile.State.set_transition
4+
race_top:^camlRe__Compile.next
5+
6+
# Data race within Compile.find_initial_state (read/write re.initial_states)
7+
race_top:^camlRe__Compile.find_initial_state
8+
9+
# Spurious data race due to the two-step initialization in Compile.State.make
10+
# (between Compile.State.get_info and Compile.State.set_info, both inlined)
11+
race_top:^camlRe__Compile.loop
12+
13+
# Race within Automata.Desc.status and Automata.Desc.status_no_mutex
14+
# (read/write s.status)
15+
race_top:^camlRe__Automata.status
16+
17+
# Race within Compile.final
18+
race_top:^camlRe__Compile.final

0 commit comments

Comments
 (0)