[llvm-commits] [compiler-rt] r161942 - /compiler-rt/trunk/lib/asan/asan_allocator.cc
Alexander Potapenko
glider at google.com
Wed Aug 15 04:32:15 PDT 2012
Author: glider
Date: Wed Aug 15 06:32:15 2012
New Revision: 161942
URL: http://llvm.org/viewvc/llvm-project?rev=161942&view=rev
Log:
Make __asan::asan_{malloc,free,memalign} globally visible, so that the dynamic version of the runtime will export them.
Modified:
compiler-rt/trunk/lib/asan/asan_allocator.cc
Modified: compiler-rt/trunk/lib/asan/asan_allocator.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_allocator.cc?rev=161942&r1=161941&r2=161942&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_allocator.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_allocator.cc Wed Aug 15 06:32:15 2012
@@ -810,17 +810,20 @@
namespace __asan {
+__attribute__((visibility("default")))
void *asan_memalign(uptr alignment, uptr size, AsanStackTrace *stack) {
void *ptr = (void*)Allocate(alignment, size, stack);
ASAN_NEW_HOOK(ptr, size);
return ptr;
}
+__attribute__((visibility("default")))
void asan_free(void *ptr, AsanStackTrace *stack) {
ASAN_DELETE_HOOK(ptr);
Deallocate((u8*)ptr, stack);
}
+__attribute__((visibility("default")))
void *asan_malloc(uptr size, AsanStackTrace *stack) {
void *ptr = (void*)Allocate(0, size, stack);
ASAN_NEW_HOOK(ptr, size);
More information about the llvm-commits
mailing list