id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 11945,Segmentation fault on using boost syslog and cpp-netlib,c.dovgal@…,Andrey Semashev,"After adding boost syslog into source code, segmentation fault appears inside cpp-netlib library. I was able to prepare minimum working code snippet to reproduce the problem. {{{ #!c++ #include #include #include #include using namespace boost::network; using namespace boost::network::http; namespace sinks = boost::log::sinks; int main() { client::request request_(""http://www.boost.org/""); client client_; client::response response_ = client_.get(request_); std::string body_ = body(response_); std::cout << ""body: "" << body_; using syslog_sinkT = sinks::synchronous_sink ; boost::shared_ptr backend = boost::make_shared (); boost::shared_ptr sink = boost::make_shared (backend); } }}} When last 2 lines are commented, segmentation fault disappears and everything works fine. gdb stack trace (approximately, may vary): {{{ Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xf7c29b40 (LWP 19874)] 0x00000000 in ?? () (gdb) where #0 0x00000000 in ?? () #1 0x083c376c in boost::asio::detail::task_io_service_operation::complete (bytes_transferred=260, ec=..., owner=..., this=0xf6900710) at /home/kostidov/prj/third_party-master/boost/boost_1_60_0/__public__/v0/Linux-libc6/include/boost/asio/detail/task_io_service_o$ eration.hpp:38 #2 boost::asio::detail::task_io_service::do_run_one (ec=..., this_thread=..., lock=..., this=) at /home/kostidov/prj/third_party-master/boost/boost_1_60_0/__public__/v0/Linux-libc6/include/boost/asio/detail/impl/task_io_serv$ ce.ipp:372 #3 boost::asio::detail::task_io_service::run (ec=..., this=0x84ea280) at /home/kostidov/prj/third_party-master/boost/boost_1_60_0/__public__/v0/Linux-libc6/include/boost/asio/detail/impl/task_io_serv$ ce.ipp:149 #4 boost::asio::io_service::run (this=0x84e9a94) at /home/kostidov/prj/third_party-master/boost/boost_1_60_0/__public__/v0/Linux-libc6/include/boost/asio/impl/io_service.ipp:59 #5 0x083b5766 in boost::_mfi::mf0::operator() (p=, this=) at /home/kostidov/prj/third_party-master/boost/boost_1_60_0/__public__/v0/Linux-libc6/include/boost/bind/mem_fn_template.hpp:49 #6 boost::_bi::list1 >::operator(), boost::_bi::list0> (a=, f=..., this=0x84ea94c) at /home/kostidov/prj/third_party-master/boost/boost_1_60_0/__public__/v0/Linux-libc6/include/boost/bind/bind.hpp:249 #7 boost::_bi::bind_t, boost::_bi::list1 > >::operator() (this=0x84ea944) at /home/kostidov/prj/third_party-master/boost/boost_1_60_0/__public__/v0/Linux-libc6/include/boost/bind/bind.hpp:1222 #8 boost::detail::thread_data, boost::_bi::$ ist1 > > >::run (this=0x84ea828) at /home/kostidov/prj/third_party-master/boost/boost_1_60_0/__public__/v0/Linux-libc6/include/boost/thread/detail/thread.hpp:116 #9 0x0840a4f8 in boost::(anonymous namespace)::thread_proxy (param=0x84ea828) at libs/thread/src/pthread/thread.cpp:167 #10 0xf7de1f70 in start_thread () from /lib/i386-linux-gnu/libpthread.so.0 #11 0xf7d18bee in clone () from /lib/i386-linux-gnu/libc.so.6 }}} Problem exists on Ubuntu 14.04 with cpp-netlib 0.11.2 and both boost versions 1_58_0 and 1_60_0. Boost, cpp-netlib and my application are compiled with -std=c++11. GCC versions which were used: 4.8.4, 5.2.0. Note 1. Segmentation fault appears inside cpp-netlib before reaching syslog_backend creation. Only presence of last 2 lines guarantees SIGSEGV reproduction.",Bugs,closed,To Be Determined,log,Boost Release Branch,Problem,invalid,,