Index: pthread.c =================================================================== RCS file: /cvsroot/src/lib/libpthread/pthread.c,v retrieving revision 1.163 diff -u -r1.163 pthread.c --- pthread.c 5 Feb 2020 14:56:04 -0000 1.163 +++ pthread.c 8 Feb 2020 16:26:16 -0000 @@ -770,11 +770,8 @@ if (__predict_false(__uselibcstub)) return __libc_thr_equal_stub(t1, t2); - pthread__error(EINVAL, "Invalid thread", - t1->pt_magic == PT_MAGIC); - - pthread__error(EINVAL, "Invalid thread", - t2->pt_magic == PT_MAGIC); + pthread__assert(t1->pt_magic == PT_MAGIC); + pthread__assert(t2->pt_magic == PT_MAGIC); /* Nothing special here. */ return (t1 == t2);