libobjc currently returns the threads id in multiple places, and assumes that it
can return NULL as an identifier for "no thread" but posix thread id's are
opqaque, hurd uses a thread id of 0 for the first thread.
i'll attach a patch which while still not correct, should show the problem
areas, and has worked for linux and hurd.
Created attachment 7570 [details]
hacky patch which changes "No thread" identifier from 0 to -1
Confirmed. Note this patch does not fix the gthr-* file in the gcc directory which are used when
building the compiler and libobjc together. (__gthread_objc_thread_detach is the function in gthr-*)
Does anyone know an standard invalid thread id.
I have a way to fix this but I will not get to it until tomorrow as I am working on fixing PR 25360 first.