id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 13611,SEGFAULT when logging std::to_string(NAN),Filip Matzner,Andrey Semashev,"Consider the following code: {{{ #include #include int main() { BOOST_LOG_TRIVIAL(info) << std::to_string(std::numeric_limits::quiet_NaN()); } }}} When compiled with: {{{ g++ -std=c++17 -DBOOST_ALL_DYN_LINK -pthread -lboost_log -O3 test.cpp && ./a.out }}} It crashes with SEGFAULT. If I replace BOOST_LOG_TRIVIAL(info) with std::cout, it does not. System: {{{ [floop@pine /tmp ]$ g++ -v ... gcc version 8.1.1 20180531 (GCC) [floop@pine /tmp ]$ uname -a Linux pine 4.16.13-2-ARCH #1 SMP PREEMPT Fri Jun 1 18:46:11 UTC 2018 x86_64 GNU/Linux }}} Note that the SEGFAULT does not happen with clang++, but only g++. It also does not happen with -O2, but only -O3. It might also be a compiler bug, you will probably know better than me. :-)",Bugs,closed,To Be Determined,log,Boost 1.67.0,Problem,invalid,,boost@…