-
Notifications
You must be signed in to change notification settings - Fork 336
ci: add sanitizer workflows #461
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
base: master
Are you sure you want to change the base?
Conversation
| - name: Configure sanitizer environment | ||
| run: | | ||
| if command -v llvm-symbolizer >/dev/null 2>&1; then | ||
| echo LLVM_SYMBOLIZER_PATH=$(command -v llvm-symbolizer) >> $GITHUB_ENV |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this for and what uses it?
|
|
||
| - uses: zacharyburnett/setup-abseil-cpp@713a4383f10b05948a6d9d4906056063c8da1168 # Not a release, but has #423 fix. | ||
| env: | ||
| CC: clang |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these need to be set again? I'm not very familiar with github actions.
| include: | ||
| - name: asan | ||
| sanitizer: address | ||
| compile_flags: "-fsanitize=address -fno-omit-frame-pointer" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WDYT about -fsanitize=address,undefined here? Merge the UBSAN and ASAN together? UBSAN is the one that catches a lot of errors during testing for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think -fsanitize=address,undefined,local-bounds,nullability looks good.
https://github.com/google/s2geometry/actions/runs/18301785002/job/53309264384?pr=461#step:3:143
| include: | ||
| - name: asan | ||
| sanitizer: address | ||
| compile_flags: "-fsanitize=address -fno-omit-frame-pointer" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not quoted correctly when expanded:
https://github.com/google/s2geometry/actions/runs/18301785002/job/53309264384?pr=461#step:3:143
Summary
Rationale
Issue #457 covers the lack of sanitizer coverage. Running ASan/MSan/TSan in CI helps catch undefined behavior early without altering the main build pipeline.
Fixes #457