[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

llvm-svn: 336139
This commit is contained in:
Kostya Kortchinsky 2018-07-02 19:48:01 +00:00
parent b01d87622b
commit 4bc7f3d4d6
1 changed files with 6 additions and 2 deletions

View File

@ -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 {