[compiler-rt] r336139 - [scudo] Enable Scudo memory hooks for Fuchsia.

Kostya Kortchinsky via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 2 12:48:01 PDT 2018


Author: cryptoad
Date: Mon Jul  2 12:48:01 2018
New Revision: 336139

URL: http://llvm.org/viewvc/llvm-project?rev=336139&view=rev
Log:
[scudo] Enable Scudo memory hooks for Fuchsia.

Summary:
    It would be useful for Flutter apps, especially, to be able to use
    malloc hooks to debug memory leaks on Fuchsia. They're not able to do
    this right now, so it'd be a nice bonus to throw in with the Scudo
    switchover.


Reviewers: cryptoad, alekseyshl

Reviewed By: cryptoad

Differential Revision: https://reviews.llvm.org/D48618

Modified:
    compiler-rt/trunk/lib/scudo/scudo_platform.h

Modified: compiler-rt/trunk/lib/scudo/scudo_platform.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/scudo/scudo_platform.h?rev=336139&r1=336138&r2=336139&view=diff
==============================================================================
--- compiler-rt/trunk/lib/scudo/scudo_platform.h (original)
+++ compiler-rt/trunk/lib/scudo/scudo_platform.h Mon Jul  2 12:48:01 2018
@@ -58,8 +58,12 @@
 // Hooks in the allocation & deallocation paths can become a security concern if
 // implemented improperly, or if overwritten by an attacker. Use with caution.
 #ifndef SCUDO_CAN_USE_HOOKS
-# define SCUDO_CAN_USE_HOOKS 0
-#endif
+# if SANITIZER_FUCHSIA
+#  define SCUDO_CAN_USE_HOOKS 1
+# else
+#  define SCUDO_CAN_USE_HOOKS 0
+# endif  // SANITIZER_FUCHSIA
+#endif  // SCUDO_CAN_USE_HOOKS
 
 namespace __scudo {
 




More information about the llvm-commits mailing list