File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed
Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 2323 && ' (free-threading)'
2424 || ''
2525 }}
26- runs-on : ubuntu-24.04
26+ strategy :
27+ fail-fast : false
28+ matrix :
29+ os : [ubuntu-24.04]
30+ openssl_ver : [3.5.4]
31+ runs-on : ${{ matrix.os }}
2732 timeout-minutes : 60
33+ env :
34+ OPENSSL_VER : ${{ matrix.openssl_ver }}
35+ MULTISSL_DIR : ${{ github.workspace }}/multissl
36+ OPENSSL_DIR : ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}
37+ LD_LIBRARY_PATH : ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}/lib
2838 steps :
2939 - uses : actions/checkout@v4
3040 with :
6979 - name : Add ccache to PATH
7080 run : |
7181 echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
82+ - name : ' Restore OpenSSL build (TSan)'
83+ id : cache-openssl
84+ uses : actions/cache@v4
85+ if : inputs.sanitizer == 'TSan'
86+ with :
87+ path : ./multissl/openssl/${{ env.OPENSSL_VER }}
88+ key : ${{ matrix.os }}-multissl-openssl-tsan-${{ env.OPENSSL_VER }}
89+ - name : Install OpenSSL (TSan)
90+ if : steps.cache-openssl.outputs.cache-hit != 'true' && inputs.sanitizer == 'TSan'
91+ run : python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux --tsan
7292 - name : Configure CPython
7393 run : >-
7494 ./configure
7999 || '--with-undefined-behavior-sanitizer'
80100 }}
81101 --with-pydebug
102+ ${{ inputs.sanitizer == 'TSan' && ' --with-openssl="$OPENSSL_DIR"' || '' }}
82103 ${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
83104 - name : Build CPython
84105 run : make -j4
Original file line number Diff line number Diff line change 158158 dest = 'keep_sources' ,
159159 help = "Keep original sources for debugging."
160160)
161+ parser .add_argument (
162+ '--tsan' ,
163+ action = 'store_true' ,
164+ dest = 'tsan' ,
165+ help = "Build with thread sanitizer. (Disables fips in OpenSSL 3.x)."
166+ )
161167
162168
163169class AbstractBuilder (object ):
@@ -312,6 +318,8 @@ def _build_src(self, config_args=()):
312318 """Now build openssl"""
313319 log .info ("Running build in {}" .format (self .build_dir ))
314320 cwd = self .build_dir
321+ if self .args .tsan :
322+ config_args += ("-fsanitize=thread" ,)
315323 cmd = [
316324 "./config" , * config_args ,
317325 "shared" , "--debug" ,
You can’t perform that action at this time.
0 commit comments