[PATCH] D39254: On FreeBSD, add -pthread to the flags for dynamic ASan tests
Kamil Rytarowski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 24 14:01:25 PDT 2017
krytarowski added a comment.
In https://reviews.llvm.org/D39254#905671, @dim wrote:
> In https://reviews.llvm.org/D39254#905639, @krytarowski wrote:
>
> > What exactly breaks?
>
>
> All dynamic ASan tests fail with:
>
> ==7913==AddressSanitizer CHECK failed: /share/dim/src/llvm/trunk/runtimes/compiler-rt/lib/asan/asan_posix.cc:49 "((0)) == ((pthread_key_create(&tsd_key, destructor)))" (0x0, 0x4e)
>
>
> This is because `AsanTSDInit()` calls `pthread_key_create()` while libthr.so is not loaded, and that causes `pthread_key_create()` to always return ENOSYS.
OK, I will put this in TODO to research for later.
>> What symbols are missing?
>
> No symbols are missing, as far as I can see.
>
>> Now are you testing it?
>
> I run `ninja check-all`.
It would be nice to narrow it down to a more specific check target. I could verify it locally.
Can you reproduce it with `check-asan-dynamic`?
>
>
>> `check-asan-dynamic` on NetBSD/amd64 works fine. Modulo around 3 tests that are unresearched.
>
> I guess NetBSD doesn't use libthr.so?
libthr.so does not exist on NetBSD.
> Are all pthread functions folded into libc.so?
No. There are stubs as weak references.
https://reviews.llvm.org/D39254
More information about the llvm-commits
mailing list