Skip to content

Commit 8fbb88f

Browse files
committed
[GWP-ASan] Disable GWP-ASan on Android for now.
Summary: Temporarily disable GWP-ASan for android until the bugs at: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-android/builds/87 ... can be fixed. See comments for the full bug trace. Reviewers: eugenis Reviewed By: eugenis Subscribers: srhines, kubamracek, mgorny, cryptoad, jfb, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D63460 llvm-svn: 363624
1 parent ca42687 commit 8fbb88f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

compiler-rt/cmake/config-ix.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,8 +687,10 @@ endif()
687687
# Note: Fuchsia and Windows are not currently supported by GWP-ASan. Support
688688
# is planned for these platforms. Darwin is also not supported due to TLS
689689
# calling malloc on first use.
690+
# TODO(hctim): Enable this on Android again. Looks like it's causing a SIGSEGV
691+
# for Scudo and GWP-ASan, further testing needed.
690692
if (COMPILER_RT_HAS_SANITIZER_COMMON AND GWP_ASAN_SUPPORTED_ARCH AND
691-
OS_NAME MATCHES "Android|Linux")
693+
OS_NAME MATCHES "Linux")
692694
set(COMPILER_RT_HAS_GWP_ASAN TRUE)
693695
else()
694696
set(COMPILER_RT_HAS_GWP_ASAN FALSE)

compiler-rt/lib/gwp_asan/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ set(GWP_ASAN_HEADERS
2121
# Ensure that GWP-ASan meets the delegated requirements of some supporting
2222
# allocators. Some supporting allocators (e.g. scudo standalone) cannot use any
2323
# parts of the C++ standard library.
24-
set(GWP_ASAN_CFLAGS -fno-rtti -fno-exceptions -fPIC -nostdinc++ -pthread)
24+
set(GWP_ASAN_CFLAGS -fno-rtti -fno-exceptions -nostdinc++ -pthread)
25+
append_list_if(COMPILER_RT_HAS_FPIC_FLAG -fPIC GWP_ASAN_CFLAGS)
2526

2627
# Remove -stdlib= which is unused when passing -nostdinc++.
2728
string(REGEX REPLACE "-stdlib=[a-zA-Z+]*" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})

0 commit comments

Comments
 (0)