google / asylo

An open and flexible framework for developing enclave applications
https://asylo.dev
Apache License 2.0
967 stars 126 forks source link

Use localtime_r in logging #42

Closed daviddrysdale closed 4 years ago

daviddrysdale commented 4 years ago

Base localtime() is not thread-safe and shows as a TSAN error. According to https://linux.die.net/man/3/localtime_r, "For portable code tzset(3) should be called before localtime_r()." so also call tzset() from InitLogging.

deeglaze commented 4 years ago

Thanks @daviddrysdale for your contribution :)