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

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 5 13:30:34 PDT 2017


eugenis added inline comments.


================
Comment at: lib/asan/asan_malloc_linux.cc:88
+    void *new_ptr = LIKELY(asan_inited) ? asan_malloc(size, &stack)
+                                        : AllocateFromLocalPool(size);
     internal_memcpy(new_ptr, ptr, copy_size);
----------------
This is fixing another, unrelated bug - right? In the case of realloc() from the dlsym pool to the regular allocator we may read past the end of the pool.

Also, this does not fix the original problem - all reallocs are served from the pool until asan is initialized. Realloc should force asan initialization the same as other interceptors.



https://reviews.llvm.org/D33784





More information about the llvm-commits mailing list