-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9470 from cms-sw/vdt-ubsan-integer-overflow
[vdt]Apply patch to avoid UBSan signed integer overflow error
- Loading branch information
Showing
2 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
diff --git a/include/sincos.h b/include/sincos.h | ||
index 563ae93..e5708c5 100644 | ||
--- a/include/sincos.h | ||
+++ b/include/sincos.h | ||
@@ -129,6 +129,9 @@ inline void fast_sincos_m45_45( const double z, double & s, double &c ) { | ||
} // End namespace details | ||
|
||
/// Double precision sincos | ||
+#ifdef CMS_UNDEFINED_SANITIZER | ||
+__attribute__((no_sanitize("signed-integer-overflow"))) | ||
+#endif | ||
inline void fast_sincos( const double xx, double & s, double &c ) { | ||
// I have to use doubles to make it vectorise... | ||
|
||
@@ -204,6 +207,9 @@ inline void fast_sincosf_m45_45( const float x, float & s, float &c ) { | ||
} // end details namespace | ||
|
||
/// Single precision sincos | ||
+#ifdef CMS_UNDEFINED_SANITIZER | ||
+__attribute__((no_sanitize("signed-integer-overflow"))) | ||
+#endif | ||
inline void fast_sincosf( const float xx, float & s, float &c ) { | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters