Most uses of ALIAS() are in conjunction with WRAPPER_NAME().
Simplify the code and just make ALIAS() turn its argument into a string
(similar to Linux kernel's __alias macro). This in turn allows removing
WRAPPER_NAME().
NFC.
Reviewed By: dvyukov
Differential Revision: https://reviews.llvm.org/D151216
This reverts commit cdf71d2ccd84ed7b8891924b04d1603f344038e9.
Relanding this because this only affects fuchsia builders and we moved
our hwasan builders to a non-blocking pool in the meantime.
This reverts commit 39ece7583a784976dea786d59e6564649b13d92d.
Reverting because I suspect this is leading to the failures we see in
fxbug.dev/125426. We're seeing unexpected OOMs and I suspect it's
because this change makes c-style allocation functions use hwasan's
allocator which might be worse than the default one (scudo). Reverting
for now to see if this unblocks the clang roll.
This reverts commit 7b6c0ce9c6c1e2cc3076e787e0e8d9a43bc2bfcc.
See if this works on the android builder this time by keeping the
original WRAP declaration.
This reverts commit c5c6781428a70d1fffd00a256a237cbf5a3ccfd3.
This likely broke the android sanitizer builders prior because it
accidentally enabled interceptors for android, which they don't use, so
c-allocation functions like malloc would go through hwasan.
This reland adds the HWASAN_WITH_INTERCEPTORS check.
This reverts commit 3b4cb1e96c645bb833fe710856479c31383859bb.
Reland D145718 but unconditionally define __sanitizer_mallinfo which is
exposed as part of the hwasan interface.
Differential Revision: https://reviews.llvm.org/D145718
"Interceptors" in this file aren't like the traditional interceptors
used by other sanitizers like asan. They're simply aliases to the
equivalent __sanitizer_* functions.
This also removes the WRAP(FN) declaration since it just creates
declarations for __interceptor_* functions but they seem to be unused.
Differential Revision: https://reviews.llvm.org/D145718
asan+lsan
We should follow suite with how asan handles this now that lsan also
works with hwasan.
Differential Revision: https://reviews.llvm.org/D145613
Since glibc 2.34, dlsym does
1. malloc 1
2. malloc 2
3. free pointer from malloc 1
4. free pointer from malloc 2
These sequence was not handled by trivial dlsym hack.
This fixes https://bugs.llvm.org/show_bug.cgi?id=52278
Reviewed By: eugenis, morehouse
Differential Revision: https://reviews.llvm.org/D112588
This removes the `__sanitizer_*` allocation function definitions from
`hwasan_interceptors.cpp` and moves them into their own file. This way
implementations that do not use interceptors at all can just ignore
(almost) everything in `hwasan_interceptors.cpp`.
Also remove some unused headers in `hwasan_interceptors.cpp` after the move.
Differential Revision: https://reviews.llvm.org/D103564