the bug is calling wakeup(r) on deallocated r.
sleep and wakeup communicate about the event represented by r,
not the structure containing r.

Reply via email to