Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not use localtime in our spdlog usage
This flag is `true` by default and makes the spdlog library to call [`localtime_r()`](https://github.com/gabime/spdlog/blob/v1.15.0/include/spdlog/pattern_formatter-inl.h#L1003), which is not safe to call within a signal handler. In Fedora and RHEL we are getting a `SIGSEGV` in the `signals_test` testsuite because of that. In Ubuntu the tests pass but it is undefined behavior. Setting it to `false` fixes the issue and has no side effects. We are [ignoring the `std::tm` argument in the `custom_flag_formatter` sub classes](https://github.com/envoyproxy/envoy/blob/v1.32.1/source/common/common/logger.cc#L430). References: - https://sourceware.org/bugzilla/show_bug.cgi?id=1390#c4 - https://man7.org/linux/man-pages/man7/signal-safety.7.html Signed-off-by: Jonh Wendell <[email protected]>
- Loading branch information