-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[UBSAN][Math] Suppress signed-integer-overflow for approx_exp #46417
Conversation
cms-bot internal usage |
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-46417/42271 Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
d5b5e2d
to
d85088f
Compare
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-46417/42272 |
please test |
A new Pull Request was created by @smuzaffar for master. It involves the following packages:
@jfernan2, @mandrenguyen can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
just tell USBAN to not worry: we know better |
thanks @VinInn . I think this is what this PR is proposing (ignore the signed integer overflow for |
I will do the same for UBSAN vdt runtime error
|
said that: in principle |
Or we change https://github.com/cms-sw/cmssw/blob/master/DataFormats/Math/interface/approx_exp.h#L168
so that for ubsan we use |
ah forget my #46417 (comment) , that will not work. UBSAN will still see the |
test parameters:
|
please test for CMSSW_14_2_UBSAN_X |
+1 Size: This PR adds an extra 20KB to repository Comparison SummarySummary:
|
@@ -122,7 +122,11 @@ end; | |||
|
|||
// valid for -87.3365 < x < 88.7228 | |||
template <int DEGREE> | |||
constexpr float unsafe_expf_impl(float x) { | |||
#ifdef CMS_UNDEFINED_SANITIZER | |||
__attribute__((no_sanitize("signed-integer-overflow"))) |
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.
Could we add comments explaining why this is done? (so that a curious reader would not have to do GitHub archaeology)
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-46417/42287 |
Pull request #46417 was updated. @cmsbuild, @jfernan2, @mandrenguyen can you please check and sign again. |
please test |
+1 Size: This PR adds an extra 24KB to repository Comparison SummarySummary:
|
+1 |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @antoniovilela, @sextonkennedy, @mandrenguyen, @rappoccio (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
This PR suggests to suppress [a] UBSAN runtime errors. According to #11753 (comment) this overflow should be considered as feature. This change will suppress the signed-integer-overflow runtime error coming from
unsafe_expf_impl()
function.Note that
CMS_UNDEFINED_SANITIZER
is cpp macro which is only set when we build UBSAN IBs.FYI @VinInn, let me know if you have any better way to fix/suppress this error
Fixes #46396
[a]