[PATCH] D33784: Bug 33206 - Sanitizer CHECK failed: ((allocated_for_dlsym)) < ((kDlsymAllocPoolSize)) (1036, 1024)) with preload

Maxim Ostapenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 2 06:32:17 PDT 2017


m.ostapenko added a comment.

In https://reviews.llvm.org/D33784#770431, @eugenis wrote:

> Yeah... that's weird.
>  Can we simply do ENSURE_ASAN_INITED(); thing in the malloc interceptor?


I don't think simple ENSURE_ASAN_INITED(); in malloc will work because during initialization ASan calls malloc again and we'll have nested malloc calls. Perhaps we can add something like:

  if (UNLIKELY(!asan_inited) && asan_init_is_running)
    return AllocateFromLocalPool(size);
  else if (LIKELY(asan_inited))
    return asan_malloc(size);
  else
    AsanInitFromRtl();
  return asan_malloc(size);

?


https://reviews.llvm.org/D33784





More information about the llvm-commits mailing list