[PATCH] D28823: Enabled -fsanitize-address-use-after-scope for -DLLVM_USE_SANITIZER=Address

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 17 13:15:34 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL292256: Enabled -fsanitize-address-use-after-scope for -DLLVM_USE_SANITIZER=Address (authored by vitalybuka).

Changed prior to commit:
  https://reviews.llvm.org/D28823?vs=84727&id=84734#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D28823

Files:
  llvm/trunk/cmake/modules/HandleLLVMOptions.cmake


Index: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
@@ -588,6 +588,9 @@
   else()
     message(FATAL_ERROR "LLVM_USE_SANITIZER is not supported on this platform.")
   endif()
+  if (LLVM_USE_SANITIZER MATCHES "(Undefined;)?Address(;Undefined)?")
+    append("-fsanitize-address-use-after-scope" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+  endif()
   if (LLVM_USE_SANITIZE_COVERAGE)
     append("-fsanitize-coverage=trace-pc-guard,indirect-calls,trace-cmp" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
   endif()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28823.84734.patch
Type: text/x-patch
Size: 666 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170117/d68bebc8/attachment.bin>


More information about the llvm-commits mailing list