In article <20210810124709.vhixir5hl5g7l...@yt.nih.at>,
Thomas Klausner  <w...@netbsd.org> wrote:
>-=-=-=-=-=-
>
>Hi!
>
>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/sanitizer_thread_registry.cc:284
> ((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
>./join

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

christos

Reply via email to