diff options
author | Kostya Kortchinsky <kostyak@google.com> | 2018-07-02 19:48:01 +0000 |
---|---|---|
committer | Kostya Kortchinsky <kostyak@google.com> | 2018-07-02 19:48:01 +0000 |
commit | 514b31282fb362eaf2f4865ebb17d00a07cb74c6 (patch) | |
tree | 362cb000a5fd849a1d1646273505369e71f3a63d /lib | |
parent | 1da06fc8d37ff2abd1da1746e4066d7fd4eaeb07 (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336139 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/scudo/scudo_platform.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/scudo/scudo_platform.h b/lib/scudo/scudo_platform.h index 9837d55f1..3a6f4be69 100644 --- a/lib/scudo/scudo_platform.h +++ b/lib/scudo/scudo_platform.h @@ -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 { |