[PATCH] D47995: [ASAN] fix startup crash in dlsym for long paths since glibc 2.27
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 13 16:53:09 PDT 2018
vitalybuka added inline comments.
================
Comment at: lib/asan/asan_malloc_linux.cc:58
+ void *prev_mem = (void*)&alloc_memory_for_dlsym[prev_offset];
+ if (prev_mem == ptr) {
+ REAL(memset)(prev_mem, 0, last_dlsym_alloc_size_in_words * kWordSize);
----------------
Alternative, more general solution is to have some bitmap which tells if byte is allocated. And then trim the tail on each free.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D47995
More information about the llvm-commits
mailing list