diff options
author | Kinan Hakim <kinan@google.com> | 2016-01-13 10:10:34 +0100 |
---|---|---|
committer | Kinan Hakim <kinan@google.com> | 2016-01-13 11:29:56 +0000 |
commit | d5da7529f7d89fa1d67191dbd22eec48cde081e2 (patch) | |
tree | 5f8b034cc0a96c12fd432d094ea75699a31baf70 | |
parent | 8e4059044ca8830c145bcb349cec836b72976039 (diff) | |
download | dng_sdk-d5da7529f7d89fa1d67191dbd22eec48cde081e2.tar.gz |
Exclude some integer sanitations
Change-Id: I33b26ec104e5184e3dfbb411ba418d7748413aa9
-rw-r--r-- | source/dng_camera_profile.cpp | 3 | ||||
-rw-r--r-- | source/dng_gain_map.cpp | 3 | ||||
-rw-r--r-- | source/dng_info.cpp | 3 | ||||
-rw-r--r-- | source/dng_lossless_jpeg.cpp | 3 | ||||
-rw-r--r-- | source/dng_resample.cpp | 3 | ||||
-rw-r--r-- | source/dng_shared.cpp | 3 | ||||
-rw-r--r-- | source/dng_utils.h | 3 |
7 files changed, 21 insertions, 0 deletions
diff --git a/source/dng_camera_profile.cpp b/source/dng_camera_profile.cpp index 6983b6d..03bb158 100644 --- a/source/dng_camera_profile.cpp +++ b/source/dng_camera_profile.cpp @@ -898,6 +898,9 @@ void dng_camera_profile::ReadHueSatMap (dng_stream &stream, /*****************************************************************************/
+#if defined(__clang__)
+__attribute__((no_sanitize("unsigned-integer-overflow")))
+#endif
void dng_camera_profile::Parse (dng_stream &stream,
dng_camera_profile_info &profileInfo)
{
diff --git a/source/dng_gain_map.cpp b/source/dng_gain_map.cpp index bc7ce05..d80aa5b 100644 --- a/source/dng_gain_map.cpp +++ b/source/dng_gain_map.cpp @@ -248,6 +248,9 @@ void dng_gain_map_interpolator::ResetColumn () /*****************************************************************************/
+#if defined(__clang__)
+__attribute__((no_sanitize("unsigned-integer-overflow")))
+#endif
dng_gain_map::dng_gain_map (dng_memory_allocator &allocator,
const dng_point &points,
const dng_point_real64 &spacing,
diff --git a/source/dng_info.cpp b/source/dng_info.cpp index e2d72a3..3bfc834 100644 --- a/source/dng_info.cpp +++ b/source/dng_info.cpp @@ -407,6 +407,9 @@ bool dng_info::ValidateIFD (dng_stream &stream, /*****************************************************************************/
+#if defined(__clang__)
+__attribute__((no_sanitize("unsigned-integer-overflow")))
+#endif
void dng_info::ParseIFD (dng_host &host,
dng_stream &stream,
dng_exif *exif,
diff --git a/source/dng_lossless_jpeg.cpp b/source/dng_lossless_jpeg.cpp index bfb2842..7ddf0fe 100644 --- a/source/dng_lossless_jpeg.cpp +++ b/source/dng_lossless_jpeg.cpp @@ -1678,6 +1678,9 @@ inline int32 dng_lossless_decoder::HuffDecode (HuffmanTable *htbl) *--------------------------------------------------------------
*/
+#if defined(__clang__)
+__attribute__((no_sanitize("undefined")))
+#endif
inline void dng_lossless_decoder::HuffExtend (int32 &x, int32 s)
{
diff --git a/source/dng_resample.cpp b/source/dng_resample.cpp index 122bff9..6552176 100644 --- a/source/dng_resample.cpp +++ b/source/dng_resample.cpp @@ -583,6 +583,9 @@ dng_resample_task::dng_resample_task (const dng_image &srcImage, /*****************************************************************************/ +#if defined(__clang__) +__attribute__((no_sanitize("unsigned-integer-overflow"))) +#endif dng_rect dng_resample_task::SrcArea (const dng_rect &dstArea) { diff --git a/source/dng_shared.cpp b/source/dng_shared.cpp index 7bd92ed..063388c 100644 --- a/source/dng_shared.cpp +++ b/source/dng_shared.cpp @@ -96,6 +96,9 @@ dng_camera_profile_info::~dng_camera_profile_info () /*****************************************************************************/ +#if defined(__clang__) +__attribute__((no_sanitize("unsigned-integer-overflow"))) +#endif bool dng_camera_profile_info::ParseTag (dng_stream &stream, uint32 parentCode, uint32 tagCode, diff --git a/source/dng_utils.h b/source/dng_utils.h index d6b79c6..7654fba 100644 --- a/source/dng_utils.h +++ b/source/dng_utils.h @@ -486,6 +486,9 @@ inline uint32 Floor_uint32 (real32 x) } +#if defined(__clang__) +__attribute__((no_sanitize("float-cast-overflow"))) +#endif inline uint32 Floor_uint32 (real64 x) { |