[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
Tue Jun 6 09:50:51 PDT 2017
m.ostapenko added a comment.
Please add a testcase. For me, following commands work:
$ cat foo.c
#include <stdlib.h>
__attribute__((constructor)) void foo() {
void *p = malloc(1 << 20);
p = malloc(1 << 20);
}
$ cat bar.c
#include <stdlib.h>
__attribute__((constructor)) void bar() {
void *p = malloc(1 << 20);
p = malloc(1 << 20);
}
$ cat main.c
int main() {
return 0;
}
$ clang -shared -fPIC bar.c -o libbar.so
$ clang -shared -fPIC foo.c -o libfoo.so ./libbar.so
$ clang main.c -o main ./libfoo.so
$ LD_PRELOAD=/usr/local/lib/clang/5.0.0/lib/linux/libclang_rt.asan-x86_64.so ./main
==13629==Sanitizer CHECK failed: /home/max/src/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:42 ((allocated_for_dlsym)) < ((kDlsymAllocPoolSize)) (131072, 1024)
https://reviews.llvm.org/D33784
More information about the llvm-commits
mailing list