[PATCH] D42199: [scudo] Fix for the Scudo interface function scope
Kostya Kortchinsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 17 14:49:18 PST 2018
cryptoad created this revision.
cryptoad added a reviewer: alekseyshl.
Herald added a subscriber: Sanitizers.
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.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D42199
Files:
lib/scudo/scudo_allocator.cpp
Index: lib/scudo/scudo_allocator.cpp
===================================================================
--- lib/scudo/scudo_allocator.cpp
+++ 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 @@
// 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"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42199.130280.patch
Type: text/x-patch
Size: 607 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180117/daf94fb2/attachment.bin>
More information about the llvm-commits
mailing list