Skip to content

gh-111758: Run UBSan in GitHub Actions #135578

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

encukou
Copy link
Member

@encukou encukou commented Jun 16, 2025

This adds a --with-undefined-behavior-sanitizer CI run, modeled after the TSan one.

The runtime should be less than 13 minutes, well below Windows runs.

Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot of duplicate boilerplate in reusable-tsan.yml and reusable-ubsan.yml, we can combine them into a single reusable workflow, and reduce future maintenance.

Something like this: hugovk@39f6c91

Note this is from this morning, and doesn't include your three recent commits.

I'm also happy to do this in a followup if you prefer.

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@encukou
Copy link
Member Author

encukou commented Jun 17, 2025

I'm also happy to do this in a followup if you prefer.

Yes, I think it's better as a follow-up. Maybe in a week or so, to let the job settle down? It's easier to edit an independent copy :)
Thank you for starting on it though!

uses: actions/cache@v4
with:
path: config.cache
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ inputs.config_hash }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the configure failure:

https://github.com/python/cpython/actions/runs/15706865183/job/44254688889?pr=135578

is because this key is identical to the one in reusable-tsan.yml, so let's add ubsan or something in here:

Suggested change
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ inputs.config_hash }}
key: ${{ github.job }}-ubsan-${{ env.IMAGE_OS_VERSION }}-${{ inputs.config_hash }}

Copy link
Member Author

@encukou encukou Jun 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ubsan is part of github.job. It's using a cache from before I added the latest commits.
I removed that cache and will restart the job. (GitHub will allow that after all the other ones finish).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants