[PATCH] D14979: [asan] Correctly release memory allocated during early startup.
Alexey Samsonov via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 30 11:37:47 PST 2015
samsonov accepted this revision.
samsonov added a comment.
This revision is now accepted and ready to land.
Looks OK, but please fix the bug pointed out below.
================
Comment at: lib/asan/asan_malloc_linux.cc:73
@@ +72,3 @@
+ if (UNLIKELY(IsInCallocPool(ptr))) {
+ uptr offset = (uptr)calloc_memory_for_dlsym - (uptr)ptr;
+ uptr copy_size = Min(size, kCallocPoolSize - offset);
----------------
ptr - calloc_memory_for_dlsym here as well
================
Comment at: lib/asan/asan_malloc_linux.cc:74
@@ +73,3 @@
+ uptr offset = (uptr)calloc_memory_for_dlsym - (uptr)ptr;
+ uptr copy_size = Min(size, kCallocPoolSize - offset);
+ void *new_ptr = asan_malloc(size, &stack);
----------------
ygribov wrote:
> Sure, but is it worth it? We do not expect pool pointers to sneak into normal allocator very often.
Okay
http://reviews.llvm.org/D14979
More information about the llvm-commits
mailing list