Stop trying to init thread local data before main()
commit76e1c8068891509807a1647f181ef27f57f43da7
authorFred Emmott <fredemmott@fb.com>
Fri, 7 Mar 2014 00:04:04 +0000 (6 16:04 -0800)
committerSara Golemon <sgolemon@fb.com>
Sat, 8 Mar 2014 05:18:03 +0000 (7 21:18 -0800)
treef606c78426f643d1fa26290ab1b2cc9e259dc9aa
parenteb680f38a1da19c18b4c513c2cfee5b8229c5895
Stop trying to init thread local data before main()

If you try to use TLS before main is called, you're gonna have a bad time

Fixes #1942

This could conceivably come back - p11-kit triggered this due to assuming that pthread_getspecific(0) will return something belonging to it, even if it's not been inited.

Reviewed By: @ptarjan

Differential Revision: D1207661
hphp/runtime/base/zend-functions.cpp
hphp/runtime/base/zend-strtod.cpp