]> granicus.if.org Git - libevent/commit
Add a magic number to debug_locks to better catch lock-coding errors.
authorDave Hart <hart@ntp.org>
Tue, 8 Mar 2011 04:08:42 +0000 (23:08 -0500)
committerNick Mathewson <nickm@torproject.org>
Tue, 8 Mar 2011 04:08:42 +0000 (23:08 -0500)
commitb4a29c0a0fbd25a2de8a16b3049677fb2b8e1645
treec31c76215cbd9a84de7ed3b5b39404d1005fe959
parent2a83ecc8496c1470c8a29fad5df1e89a9d1d9864
Add a magic number to debug_locks to better catch lock-coding errors.

Original description by Dave Hart:

 [This patch contains] the addition of a signature field to debug_lock
 initialized by the alloc routine and verified by the rest, to catch
 invalid lock pointers sooner. That helped me track down a nasty
 problem I had before adding the time.h include to
 libevent-internal.h, where different .c files had different ideas of
 whether event_base had a tod_tv_cache member depending on which
 included time.h before libevent-internal.h.
evthread.c