[PATCH] D42506: [scudo] Remove SANITIZER_LINUX requirement for the malloc interceptors

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 24 14:29:31 PST 2018


cryptoad created this revision.
cryptoad added reviewers: alekseyshl, flowerhack.
Herald added subscribers: Sanitizers, delcypher.

Currently all platforms are using the `scudo_interceptors.cpp` interceptors.

We might to come up with platform specific interceptors when/if we get Apple &
Windows, but as of now, that allows for Fuchsia to use them.

`scudo_new_delete.cpp` didn't have the `#if SANITIZER_LINUX` so it's good to go.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D42506

Files:
  lib/scudo/scudo_interceptors.cpp


Index: lib/scudo/scudo_interceptors.cpp
===================================================================
--- lib/scudo/scudo_interceptors.cpp
+++ lib/scudo/scudo_interceptors.cpp
@@ -7,13 +7,10 @@
 //
 //===----------------------------------------------------------------------===//
 ///
-/// Linux specific malloc interception functions.
+/// Interceptors for malloc related functions.
 ///
 //===----------------------------------------------------------------------===//
 
-#include "sanitizer_common/sanitizer_platform.h"
-#if SANITIZER_LINUX
-
 #include "scudo_allocator.h"
 
 #include "interception/interception.h"
@@ -71,5 +68,3 @@
 INTERCEPTOR(int, mallopt, int cmd, int value) {
   return -1;
 }
-
-#endif  // SANITIZER_LINUX


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42506.131357.patch
Type: text/x-patch
Size: 738 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180124/d1a41f73/attachment.bin>


More information about the llvm-commits mailing list