From c244886cc4a87f14f36bf7b2b79adb9cc2dfefce Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Wed, 31 Oct 2018 12:17:10 +0100 Subject: [PATCH] New local GCC patch for CAN_SANITIZE_UB ifdef. 2018-10-31 Martin Liska * ubsan/ubsan_platform.h: Add ifndef as we define it with -DCAN_SANITIZE_UB CFLAGS. From-SVN: r265669 --- libsanitizer/ChangeLog | 5 +++++ libsanitizer/ubsan/ubsan_platform.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog index 4a933020bbd..37fe4689725 100644 --- a/libsanitizer/ChangeLog +++ b/libsanitizer/ChangeLog @@ -1,3 +1,8 @@ +2018-10-31 Martin Liska + + * ubsan/ubsan_platform.h: Add ifndef as we define it with + -DCAN_SANITIZE_UB CFLAGS. + 2018-10-31 Martin Liska * asan/asan_mapping.h: Revert shadow memory offset to 1 << 41. diff --git a/libsanitizer/ubsan/ubsan_platform.h b/libsanitizer/ubsan/ubsan_platform.h index 75d06646ce8..67c4e079724 100644 --- a/libsanitizer/ubsan/ubsan_platform.h +++ b/libsanitizer/ubsan/ubsan_platform.h @@ -11,6 +11,7 @@ #ifndef UBSAN_PLATFORM_H #define UBSAN_PLATFORM_H +#ifndef CAN_SANITIZE_UB // Other platforms should be easy to add, and probably work as-is. #if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || \ defined(__NetBSD__) || defined(__OpenBSD__) || \ @@ -20,5 +21,6 @@ #else # define CAN_SANITIZE_UB 0 #endif +#endif //CAN_SANITIZE_UB #endif -- 2.30.2