[PATCH] Protection against stack-based memory corruption errors using SafeStack: compiler-rt runtime support library

Alexey Samsonov vonosmas at gmail.com
Wed May 6 16:30:13 PDT 2015


================
Comment at: lib/CMakeLists.txt:12
@@ -11,2 +11,3 @@
   add_subdirectory(ubsan)
+  add_subdirectory(safestack)
 endif()
----------------
I thought you need to add this if `COMPILER_RT_HAS_SAFESTACK` is true.

================
Comment at: test/safestack/CMakeLists.txt:5
@@ +4,3 @@
+if(NOT COMPILER_RT_STANDALONE_BUILD)
+  list(APPEND SAFESTACK_TEST_DEPS safestack clang)
+endif()
----------------
I believe you also need `${SANIITIZER_COMMON_LIT_TEST_DEPS}`

================
Comment at: test/safestack/check-overflow.c:5
@@ +4,3 @@
+// RUN: %clang_nosafestack -fno-stack-protector %s -o %t
+// RUN: %run ! %t
+
----------------
use not (here and below)

================
Comment at: test/safestack/lit.site.cfg.in:5
@@ +4,3 @@
+# Tool-specific config options.
+config.safestack_lit_binary_dir = "@SAFESTACK_LIT_BINARY_DIR@"
+
----------------
You don't use this attribute anywhere, delete it.

http://reviews.llvm.org/D6096

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list