This pertains to GNU gcc Thread Local Storage.
The storage class specifier "__thread" malfunctions
if the thread-local variable is a C++ static class member.
The variable apparently had a garbage value.
The same code works ok on Linux.
It will work ok on FreeBSD as an ordinary global variable (C extern linkage).
I used g++ 3.4.6 on FreeBSD 6.2.
How-To-Repeat: Write pthreads code where two threads
access a static class member in Thread Local Storage.
This does not sound i386-specific.
We don't really support gcc-3.4.6 (or FreeBSD 6.2) anymore, please check a newer version of FreeBSD with clang.