diff options
| author | Kostya Kortchinsky <kostyak@google.com> | 2018-01-17 23:10:02 +0000 |
|---|---|---|
| committer | Kostya Kortchinsky <kostyak@google.com> | 2018-01-17 23:10:02 +0000 |
| commit | 33802be5791fd085518eaad60f964b868fbdf473 (patch) | |
| tree | e017a01fff9995a55d7b575c7e1bca46049b8c7f /compiler-rt/lib/scudo/scudo_allocator.cpp | |
| parent | c8032c623300dac2c47cf3c747529046b3ba1f44 (diff) | |
| download | bcm5719-llvm-33802be5791fd085518eaad60f964b868fbdf473.tar.gz bcm5719-llvm-33802be5791fd085518eaad60f964b868fbdf473.zip | |
[scudo] Fix for the Scudo interface function scope
Summary:
A forgotten include in `scudo_allocator.cpp` made the symbol only local :/
Before:
```
nm ./lib/clang/7.0.0/lib/linux/libclang_rt.scudo-i686-android.so | grep rss
00024730 t __scudo_set_rss_limit
```
After:
```
nm ./lib/clang/7.0.0/lib/linux/libclang_rt.scudo-i686-android.so | grep rs
00024760 T __scudo_set_rss_limit
```
And we want `T`!
This include also means that we can get rid of the `extern "C"` in the C++
file, the compiler does fine without it (note that this was already the case
for all the `__sanitizer_*` interface functions.
Reviewers: alekseyshl, eugenis
Reviewed By: eugenis
Subscribers: #sanitizers, llvm-commits
Differential Revision: https://reviews.llvm.org/D42199
llvm-svn: 322782
Diffstat (limited to 'compiler-rt/lib/scudo/scudo_allocator.cpp')
| -rw-r--r-- | compiler-rt/lib/scudo/scudo_allocator.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler-rt/lib/scudo/scudo_allocator.cpp b/compiler-rt/lib/scudo/scudo_allocator.cpp index 1329497f41a..0e18141f48c 100644 --- a/compiler-rt/lib/scudo/scudo_allocator.cpp +++ b/compiler-rt/lib/scudo/scudo_allocator.cpp @@ -17,6 +17,7 @@ #include "scudo_allocator.h" #include "scudo_crc32.h" #include "scudo_flags.h" +#include "scudo_interface_internal.h" #include "scudo_tsd.h" #include "scudo_utils.h" @@ -735,10 +736,8 @@ uptr __sanitizer_get_allocated_size(const void *Ptr) { // Interface functions -extern "C" { void __scudo_set_rss_limit(uptr LimitMb, s32 HardLimit) { if (!SCUDO_CAN_USE_PUBLIC_INTERFACE) return; Instance.setRssLimit(LimitMb, !!HardLimit); } -} // extern "C" |

