fix ASAN build
authorBin Liu <binliu@fb.com>
Thu, 30 Nov 2017 23:52:54 +0000 (15:52 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 1 Dec 2017 00:12:08 +0000 (16:12 -0800)
Summary:
Fix bug in non-jemalloc build.

(Note: this ignores all push blocking failures!)

Reviewed By: igorsugak

Differential Revision: D6451342

fbshipit-source-id: 44725d4e0c685a59325fa3d08877d0f62120c5c2

folly/memory/Malloc.h

index e774dd0e907bffe80f1c473ac4ac872685906054..9eaf2c6ccec0f2777614262295924f32ed8d1dc9 100644 (file)
@@ -144,10 +144,11 @@ namespace folly {
 #define FOLLY_MALLOC_CHECKED_MALLOC
 #endif
 
+#include <folly/CPortability.h>
 /**
  * Determine if we are using jemalloc or not.
  */
-#ifdef USE_JEMALLOC
+#if defined(USE_JEMALLOC) && !FOLLY_SANITIZE
 inline bool usingJEMalloc() noexcept {
   return true;
 }