• Philippe Gerum's avatar
    copperplate/threadobj: fix NULL dereference in threadobj_unblock() · 945c7dbf
    Philippe Gerum authored
    threadobj_unblock() simply does not work, dereferencing a NULL pointer
    whenever it actually manages to unblock a thread waiting on a
    synchronization object.
    Calling syncobj_flush() on this object to wake up waiters zeroes the
    wait_sobj field in the corresponding TCBs, so don't dereference
    thobj->wait_sobj past this point.
    Thread 1 "main" received signal SIGSEGV, Segmentation fault.
    0x00007ffff79aeda0 in __syncobj_tag_unlocked (sobj=0x0) at include/copperplate/syncobj.h:100
    100		assert(sobj->flags & SYNCOBJ_LOCKED);
    (gdb) bt