Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 35.1k
gh-143750: Compile OpenSSL with TSan for TSan CI#153316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
06b4de4c25b785c89f2a45591bbebc62a6aFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -17,6 +17,7 @@ permissions: | ||
| env: | ||
| FORCE_COLOR: 1 | ||
| OPENSSL_VER: 3.5.7 | ||
| jobs: | ||
| build-san-reusable: | ||
| @@ -38,28 +39,55 @@ jobs: | ||
| run: | | ||
| sudo ./.github/workflows/posix-deps-apt.sh | ||
| # On ubuntu-26.04 image, clang is clang-21 by default | ||
| if [ "${SANITIZER}" = "TSan" ]; then | ||
| # Reduce ASLR to avoid TSan crashing | ||
| sudo sysctl -w vm.mmap_rnd_bits=28 | ||
| fi | ||
| - name: Sanitizer option setup | ||
| run: | | ||
| if [ "${SANITIZER}" = "TSan" ]; then | ||
| echo "TSAN_OPTIONS=${SAN_LOG_OPTION} suppressions=${GITHUB_WORKSPACE}/Tools/tsan/suppressions${{ | ||
| fromJSON(inputs.free-threading) | ||
| && '_free_threading' | ||
| || '' | ||
| }}.txt handle_segv=0" >> "$GITHUB_ENV" | ||
| else | ||
| echo "UBSAN_OPTIONS=${SAN_LOG_OPTION} halt_on_error=1 suppressions=${GITHUB_WORKSPACE}/Tools/ubsan/suppressions.txt" >> "$GITHUB_ENV" | ||
| fi | ||
| echo "CC=clang" >> "$GITHUB_ENV" | ||
| echo "CXX=clang++" >> "$GITHUB_ENV" | ||
| - name: TSan option setup | ||
| if: inputs.sanitizer == 'TSan' | ||
| run: | | ||
| sudo sysctl -w vm.mmap_rnd_bits=28 # Reduce ASLR to avoid TSan crashing | ||
| echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> "$GITHUB_ENV" | ||
| echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> "$GITHUB_ENV" | ||
| echo "TSAN_OPTIONS=${SAN_LOG_OPTION} suppressions=${GITHUB_WORKSPACE}/Tools/tsan/suppressions${SUPPRESSIONS_SUFFIX}.txt handle_segv=0" >> "$GITHUB_ENV" | ||
| env: | ||
| SANITIZER: ${{ inputs.sanitizer }} | ||
| SAN_LOG_OPTION: log_path=${{ github.workspace }}/san_log | ||
| SUPPRESSIONS_SUFFIX: >- | ||
| ${{ | ||
| fromJSON(inputs.free-threading) | ||
| && '_free_threading' | ||
| || '' | ||
webknjaz marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| }} | ||
| - name: UBSan option setup | ||
| if: inputs.sanitizer != 'TSan' | ||
| run: >- | ||
| echo | ||
| "UBSAN_OPTIONS=${SAN_LOG_OPTION} | ||
| halt_on_error=1 | ||
| suppressions=${GITHUB_WORKSPACE}/Tools/ubsan/suppressions.txt" | ||
| >> "$GITHUB_ENV" | ||
| env: | ||
| SAN_LOG_OPTION: log_path=${{ github.workspace }}/san_log | ||
| - name: Add ccache to PATH | ||
| run: | | ||
| echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV" | ||
| - name: 'Restore OpenSSL build (TSan)' | ||
| id: cache-openssl | ||
| if: inputs.sanitizer == 'TSan' | ||
| uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 | ||
| with: | ||
| path: ./multissl/openssl/${{ env.OPENSSL_VER }} | ||
| key: ${{ env.IMAGE_OS_VERSION }}-multissl-openssl-tsan-${{ env.OPENSSL_VER }} | ||
| - name: Install OpenSSL (TSan) | ||
| if: >- | ||
| inputs.sanitizer == 'TSan' | ||
| && steps.cache-openssl.outputs.cache-hit != 'true' | ||
| run: >- | ||
| python3 Tools/ssl/multissltests.py | ||
| --steps=library | ||
| --base-directory="${MULTISSL_DIR}" | ||
| --openssl="${OPENSSL_VER}" | ||
| --system=Linux | ||
| --tsan | ||
| - name: Configure CPython | ||
| run: >- | ||
| ./configure | ||
| @@ -70,6 +98,7 @@ jobs: | ||
| || '--with-undefined-behavior-sanitizer --with-strict-overflow' | ||
| }} | ||
| --with-pydebug | ||
| ${{ inputs.sanitizer == 'TSan' && '--with-openssl="$OPENSSL_DIR" --with-openssl-rpath=auto' || '' }} | ||
kumaraditya303 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| ${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }} | ||
| - name: Build CPython | ||
| run: make -j4 | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.