id summary reporter owner description type status milestone component version severity resolution keywords cc 12156 AddressSanitizer reports stack-buffer-overflow for error_with_option_name::substitute_placeholders Dan Berger Vladimir Prus "When `boost::program_options::parse_command_line(...)` throws for an unrecognized option it triggers !AddressSanitizer (under gcc 5.3.0, boost 1.60): {{{ ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fffe6ce7070 at pc 0x0000007406cd bp 0x7fffe6ce6fe0 sp 0x7fffe6ce6fd8 READ of size 8 at 0x7fffe6ce7070 thread T0 #0 0x7406cc in std::_Head_base<0ul, std::__cxx11::basic_string, std::allocator >&&, false>::_M_head(std::_Head_base<0ul, std::__cxx11::basic_string, std::allocator >&&, false>&) /frc/toolchain6/include/c++/5.3.0/tuple:142 #1 0x7406cc in _M_create_node /frc/toolchain6/include/c++/5.3.0/tuple:347 #2 0x7403fd in std::_Rb_tree_iterator, std::allocator > const, std::__cxx11::basic_string, std::allocator > > > std::_Rb_tree, std::allocator >, std::pair, std::allocator > const, std::__cxx11::basic_string, std::allocator > >, std::_Select1st, std::allocator > const, std::__cxx11::basic_string, std::allocator > > >, std::less, std::allocator > >, std::allocator, std::allocator > const, std::__cxx11::basic_string, std::allocator > > > >::_M_emplace_hint_unique, std::allocator >&&>, std::tuple<> >(std::_Rb_tree_const_iterator, std::allocator > const, std::__cxx11::basic_string, std::allocator > > >, std::piecewise_construct_t const&, std::tuple, std::allocator >&&>&&, std::tuple<>&&) /frc/toolchain6/include/c++/5.3.0/bits/stl_tree.h:2170 #3 0xd5eff8 in boost::program_options::error_with_option_name::substitute_placeholders(std::__cxx11::basic_string, std::allocator > const&) const (/home/joe/myapp_workspace/myapp/myapp-debug+0xd5eff8) #4 0xd5c0dd in boost::program_options::error_with_option_name::what() const (/home/joe/myapp_workspace/myapp/myapp-debug+0xd5c0dd) #5 0x58addf in main /home/joe/myapp_workspace/myapp/main.cpp:62 #6 0x7fd7e056176c in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2176c) #7 0x436aa0 (/home/joe/myapp_workspace/myapp/myapp-debug+0x436aa0) }}} " Bugs new To Be Determined program_options Boost 1.61.0 Problem