Disable MemoryIdler::unmapUnusedStack with ASAN
authorAndrii Grynenko <andrii@fb.com>
Wed, 1 Mar 2017 18:35:36 +0000 (10:35 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 1 Mar 2017 18:49:46 +0000 (10:49 -0800)
Summary: It doesn't work nicely with fake stacks (which are used with detect_stack_use_after_return).

Reviewed By: yfeldblum

Differential Revision: D4631995

fbshipit-source-id: f139041314f8f64c0cf0a15874d6a4710fb2a5b6

folly/detail/MemoryIdler.cpp

index 1228685..129debd 100644 (file)
@@ -80,7 +80,7 @@ void MemoryIdler::flushLocalMallocCaches() {
 // and arithmetic (and bug compatibility) are not portable.  The set of
 // platforms could be increased if it was useful.
 #if (FOLLY_X64 || FOLLY_PPC64) && defined(_GNU_SOURCE) && \
-    defined(__linux__) && !FOLLY_MOBILE
+    defined(__linux__) && !FOLLY_MOBILE && !FOLLY_SANITIZE_ADDRESS
 
 static FOLLY_TLS uintptr_t tls_stackLimit;
 static FOLLY_TLS size_t tls_stackSize;