Closed anti-social closed 7 years ago
Unfortunately that patch doesn't fix problem reliably.
Unfortunately that patch doesn't fix problem reliably.
That's weird. Anyway, given the scope of the patch let's merge it in, and see if it's still annoying.
Sometimes hhvm's
date_default_timezone_get
function returns empty string that leads to the following error (despite that the documentation says that it should returnUTC
when it is not possible to determine timezone):It was interesting investigation. The only thing why that could happen I think is a race condition when initializing static variable
s_guessed_timezone
: https://github.com/facebook/hhvm/blob/HHVM-3.11/hphp/runtime/base/timezone.cpp#L77 Hhvm on Ubuntu Xenial was build against gcc 5.3.1. Default mode for pre-6 gcc is-std=gnu++98
. But onlyC++11
standard garantees thread safe initialization of the static variables.