[llvm-commits] [compiler-rt] r163686 - in /compiler-rt/trunk: CMakeLists.txt lib/asan/asan_interceptors.cc lib/asan/tests/CMakeLists.txt lib/asan/tests/asan_noinst_test.cc lib/sanitizer_common/CMakeLists.txt
Alexey Samsonov
samsonov at google.com
Wed Sep 12 00:38:48 PDT 2012
Author: samsonov
Date: Wed Sep 12 02:38:47 2012
New Revision: 163686
URL: http://llvm.org/viewvc/llvm-project?rev=163686&view=rev
Log:
[Sanitizer] first effort to start building ASan runtime with -Werror in CMake build
Modified:
compiler-rt/trunk/CMakeLists.txt
compiler-rt/trunk/lib/asan/asan_interceptors.cc
compiler-rt/trunk/lib/asan/tests/CMakeLists.txt
compiler-rt/trunk/lib/asan/tests/asan_noinst_test.cc
compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt
Modified: compiler-rt/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=163686&r1=163685&r2=163686&view=diff
==============================================================================
--- compiler-rt/trunk/CMakeLists.txt (original)
+++ compiler-rt/trunk/CMakeLists.txt Wed Sep 12 02:38:47 2012
@@ -62,6 +62,7 @@
# Provide some common commmandline flags for Sanitizer runtimes.
set(SANITIZER_COMMON_CFLAGS
+ -Werror
-fPIC
-fno-builtin
-fno-exceptions
Modified: compiler-rt/trunk/lib/asan/asan_interceptors.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_interceptors.cc?rev=163686&r1=163685&r2=163686&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_interceptors.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_interceptors.cc Wed Sep 12 02:38:47 2012
@@ -625,7 +625,7 @@
#if !MAC_INTERPOSE_FUNCTIONS
// If we're using dynamic interceptors on Mac, these two are just plain
// functions.
- *(uptr*)&REAL(memcpy) = (uptr)REAL(memmove);
+ internal_memcpy(&REAL(memcpy), &REAL(memmove), sizeof(REAL(memmove)));
#endif
}
Modified: compiler-rt/trunk/lib/asan/tests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/CMakeLists.txt?rev=163686&r1=163685&r2=163686&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/asan/tests/CMakeLists.txt Wed Sep 12 02:38:47 2012
@@ -17,6 +17,7 @@
set(ASAN_UNITTEST_COMMON_CFLAGS
-Wall
-Wno-format
+ -Werror
-fvisibility=hidden
-g
-O2
Modified: compiler-rt/trunk/lib/asan/tests/asan_noinst_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_noinst_test.cc?rev=163686&r1=163685&r2=163686&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_noinst_test.cc (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_noinst_test.cc Wed Sep 12 02:38:47 2012
@@ -678,9 +678,10 @@
}
static void ErrorReportCallbackOneToZ(const char *report) {
- write(2, "ABCDEF", 6);
- write(2, report, strlen(report));
- write(2, "ABCDEF", 6);
+ int report_len = strlen(report);
+ ASSERT_EQ(6, write(2, "ABCDEF", 6));
+ ASSERT_EQ(report_len, write(2, report, report_len));
+ ASSERT_EQ(6, write(2, "ABCDEF", 6));
_exit(1);
}
Modified: compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt?rev=163686&r1=163685&r2=163686&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt Wed Sep 12 02:38:47 2012
@@ -58,7 +58,7 @@
add_library(RTSanitizerCommon.test STATIC ${SANITIZER_SOURCES})
# Build test library with debug info.
set_target_compile_flags(RTSanitizerCommon.test
- ${SANITIZER_CFLAGS} -g -Werror)
+ ${SANITIZER_CFLAGS} -g)
set_target_properties(RTSanitizerCommon.test PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
More information about the llvm-commits
mailing list