Commit fbaf0770a709aaf7ed50914e26ea3d5a350e189d

Nick Mathewson 2010-10-26T12:09:20

Fix bugs in posix thread-id calculation when sizeof(pthread_t) != sizeof(long) When pthread_t was smaller, our calculated thread IDs would include uninitialized RAM, and so our unit tests would fail because thread_ids would never match one another. When pthread_t was larger and alignment was big-endian, our calculated thread IDs would only have the most significant bytes of the pthread_t, when in practice all the entropy is in the low-order bytes. Found with help from Dagobert Michelsen.