-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
CI should run Undefined Behavior Sanitizer (UBSAN), as already done for ASAN #111758
Comments
Note that By default, UBSAN will not abort on errors, which might mean errors are being missed by the fuzzer right now which does seem to use UBSAN? Not sure how the configuration works for that job:
|
cc @gpshead as we've discussed build issues before and this feels like it's in your wheelhouse |
Overall in favor. Doing this in CI is predicated on if we actually pass UBSAN today and which things we need to categorize and disable in order to do so. |
Note that there have been some UB reports in the past that may be technically correct from a C++ compiler spec perspective (read: Work to be done there (if any) is mostly around categorization and how to tell UBSAN which things we know and are okay with, the goal being not to introduce more. |
For example, clang 17 ubsan gives triggers a build failure trying to run _freeze_module:
|
Yeah, see #111178 for that one. I'm not sure that this use as it stands is compatible with CFI which is a useful exploit mitigation. But yeah, categorising existing errors sounds fine, sorting them into "things we should fix" and "things we want to make defined in CPython". |
Feature or enhancement
Proposal:
cpython's CI should run Undefined Behavior Sanitizer (UBSAN), like it already does for Address Sanitizer (ASAN).
It already has support in configure for this with
./configure --with-undefined-behavior-sanitizer
.This is important for portability, future proofing (keeping CPython working with a range of compilers), and avoiding confusing bug reports later when UB manifests.
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
The text was updated successfully, but these errors were encountered: