-
-
Notifications
You must be signed in to change notification settings - Fork 31k
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
gh-111178: add UBSan suppression file #124763
Conversation
e64c58b
to
4ee9ca3
Compare
If possible, I would prefer to fix known issues rather than ignoring them. |
That would be best, but this PR could make the UBSan buildbot green so that it can detect other (and more important) kinds of undefined behaviour. I think we generally put tool configuration in |
I found
For that, we don't really need to because I think the regular By the way, once we're done with those fixes, the file would be anyway empty. I'll actually leave it here so that people can easily pick up what's wrong. There are explanations on which functions to files to patch (and how to generate the up-to-date list of fixable files) so you can just take a look and choose any of the bad files (maybe that's what Victor did? I saw a lot of small PRs today). |
Oh! Never mind me then.
It doesn't: https://buildbot.python.org/#/builders/719/builds/4835/steps/4/logs/stdio |
I re-ran my script and some new locations with errors were found (probably because some calls where analyzed differently). So I don't think it's a good idea to have a suppression file =/ (it will likely change every time a new fix is pushed). Maybe the best way to show the issues is to run the script locally? (like our new toy with warnings?) |
Oh. Yeah, that's a good reason against adding the file. |
Should I write in some devguide or in some internal file so that it can help in the future? (I can also just close the PR and we would remember (probably) it). |
This might be too specific to the current situation, with a lot of UB found with a new check, and with problems being reported in very different places than where they should be fixed. |
Closing since we won't add it anyway. I'll just post the script on the issue so that people can just cc it if needed. |
This is the suppression file for the current UBSan failures. Technically, invoking
make UBSAN_OPTIONS=suppressions="$(pwd)/Tools/usan/usan.function.supp"
would make the CI/CD green for
-fsanitize=function
(we'll need to update the build bot so that it uses this suppression file).Note
Currently, suppressing specific UBSan failures for specific functions in specific files is not supported by Clang, so we need to suppress the entire file (i.e., I won't be able to make function-by-function PRs but will need to make file-by-file PRs).
Note that the files being suppressed are the files where the UB occurs, not where the bad function is being defined.