diff options
author | Kostya Kortchinsky <kostyak@google.com> | 2018-01-25 20:42:44 +0000 |
---|---|---|
committer | Kostya Kortchinsky <kostyak@google.com> | 2018-01-25 20:42:44 +0000 |
commit | 4b4db0057fbc3e9a74e056526be5205b2a2dabf2 (patch) | |
tree | a0f8deb01543b82763843dc36bd29fcb9f515bcf /llvm/tools/llvm-objcopy/llvm-objcopy.cpp | |
parent | df3559407779f3cad36a927448488462538da81e (diff) | |
download | bcm5719-llvm-4b4db0057fbc3e9a74e056526be5205b2a2dabf2.tar.gz bcm5719-llvm-4b4db0057fbc3e9a74e056526be5205b2a2dabf2.zip |
[scudo] Overhaul malloc related interceptors
Summary:
This is a follow-up to D42506.
There are a few of things that bothered me about `scudo_interceptors.cpp`:
- the filename is a misnomer: it intercepts some functions, but the rest (C++)
is actually in `scudo_new_delete.cpp`. I feel like `scudo_malloc.cpp` is more
appropriate (ASan uses the same naming scheme);
- we do not need "full" interceptors, since we are never accessing the
unsanitized version of the functions, we just need the
`extern "C" INTERCEPTOR_ATTRIBUTE` part of it to just call our functions;
- a couple of functions where duplicated while they could just be `ALIAS`'d;
- use the `SANITIZER_INTERCEPT_*` defines to hide the unneeded interceptors;
- use `SIZE_T` instead of `uptr`: while it's the same behind the curtain,
the former is meant for this use case.
In the end there is no functional change on the currently supported platforms
(Linux, Android).
Reviewers: alekseyshl
Reviewed By: alekseyshl
Subscribers: mgorny, hintonda, delcypher, #sanitizers, llvm-commits
Differential Revision: https://reviews.llvm.org/D42546
llvm-svn: 323464
Diffstat (limited to 'llvm/tools/llvm-objcopy/llvm-objcopy.cpp')
0 files changed, 0 insertions, 0 deletions