Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Problem with -fsanitize=leak and libpthread

In article <>,
Thomas Klausner  <> wrote:
>I was looking for memory leaks in a threaded program using
>-fsanitize=leak when I had a weird issue with pthread_join not working
>after pthread_cancel.
>So I wrote a small test program. When I compile this with leak
>detection, it doesn't even start:
>==23045==Sanitizer CHECK failed:
>/usr/src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/ ((tid)) < ((n_contexts_)) (4294967295, 1)
>Any ideas?
>To reproduce, install NetBSD/9.99.88/amd64 and do
>gcc -g -fsanitize=leak -o join join.c -lpthread

I used
cc -fsanitize=leak -pthread join.c -o join
and it worked


Home | Main Index | Thread Index | Old Index