Closed picnixz closed 2 months ago
Closing in favor of the meta-issue python/cpython#111178
Because of the sheer amount of work to do (I just looked at what I needed to do, fixed 1-2 things and then gave up), I suggest adding a new build bot with -fsanitize=undefined -fno-sanitize=function -fsanitize-recover
. That way, we could catch the other undefined behaviours that are not due to those casts. Currently, the build bot fails fast (and we only see 1 UB per build due to the -fno-sanitize-recover
) but I think that most of the time, we won't have a lot of UBs (or else it's bad for us...). As such, having a build bot that builds entirely (with -fsanitize-recover
) instead of fast-failing would help a lot in detecting the other cases.
Once this new build bot is green, we can focus on eliminating the UBs related to function pointers.
Note: see https://github.com/python/cpython/pull/123004#issuecomment-2288611116 for what was detected as a first pass. I suspect there are UBs that are not detected but that's for another day.
Originally posted by @picnixz in https://github.com/python/cpython/issues/111178#issuecomment-2289087204
@pablogsal I was told that you were responsible for the USAN build bot. Could you consider
adding a build bot with the above configuration (namely, -fsanitize=undefined -fno-sanitize=function -fsanitize-recover
) please?
Should this issue be moved to the buildbot repo?
Oh yes, please. How can I do it easily? Should I just close this one and open a new one out there? (I forgot about the other repository...)
Should this issue be moved to the buildbot repo?
Is the repository in question: https://github.com/python/buildmaster-config? or is it another one?
@pablogsal I was told that you were responsible for the USAN build bot. Could you consider
adding a build bot with the above configuration (namely,
-fsanitize=undefined -fno-sanitize=function -fsanitize-recover
) please?
Yeah absolutely! Do you want another bot with those settings or to just substitute the current one?
I have transferred the issue 👍
I would like to keep the current one because it's important to cover -fsanitize=undefined
in general, so another one it would be. Thank you in advance (and for transfering the issue)! Alternatively, what you could do with the current one is to remove the -fno-sanitize-recover
option so that the build does not early exit. I'm not sure whether you wanted an early exit or not in order to reduce the resources being taken by the way but by exiting early, we can only patch one error per build being triggered.
Another option would be to add an ignore list to Misc/
(next to the Valgrind suppression file), keep the currently known failures there, and turn it on for --with-undefined-behavior-sanitizer
builds (including the buildbot).
I'm not sure if that supports filtering on function
, though. Another option would be a runtime suppression list.
Thank you!
Bug report
Bug description:
Tests are broken for build bot Arch Linux Usan 3.x/4532 since the compilation fails with:
See for instance https://buildbot.python.org/#/builders/720/builds/1300.
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response