Boost logo

Boost Users :

From: Stephen Torri (storri_at_[hidden])
Date: 2005-03-07 16:38:12


I am testing out gcc 4.0 with an application that I am building. I found
that there is a segfault in the command line parser for boost program
options. While I understand that boost has yet to officially support gcc
4.0 I want to alert the developers to a potential problem. Ofcourse this
needs to be investigated to ensure that the compiler is not the cause of
the error. If it is then I can forward the test program attached along
with the boost developer's response to the gcc developers.

--------- G++ compiler ------------
bash-2.05b$ /usr/local/bin/g++ -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc/configure : (reconfigured) ../gcc/configure
Thread model: posix
gcc version 4.0.0 20050226 (prerelease)

---------- Boost version -------------
boost 1.32-r1 (Gentoo 2004.3 profile)

--------- Program backtrace ---------
Program received signal SIGSEGV, Segmentation fault.
__gnu_cxx::__pool<true>::_M_reclaim_block (this=0x80518c0, __p=0x80555d8
"",
    __bytes=0) at mt_allocator.cc:222
222 const size_t __which = _M_binmap[__bytes];
Current language: auto; currently c++
(gdb) bt
#0 __gnu_cxx::__pool<true>::_M_reclaim_block (this=0x80518c0,
    __p=0x80555d8 "", __bytes=0) at mt_allocator.cc:222
#1 0x0804bf97 in __gnu_cxx::__mt_alloc<std::string,
__gnu_cxx::__common_pool_policy<__gnu_cxx::__pool, true> >::deallocate
()
#2 0x0804bfc1 in std::_Vector_base<std::string,
std::allocator<std::string> >::_M_deallocate ()
#3 0x0804bff9 in std::_Vector_base<std::string,
std::allocator<std::string> >::~_Vector_base ()
#4 0x0804c0a6 in std::vector<std::string, std::allocator<std::string>
>::~vector ()
#5 0x0804c0e5 in
boost::program_options::common_command_line_parser::~common_command_line_parser ()
#6 0x0804c13b in
boost::program_options::basic_command_line_parser<char>::~basic_command_line_parser ()
#7 0x0804e0a3 in boost::program_options::parse_command_line<char> ()
#8 0x0804a5c2 in main ()
(gdb) quit

Stephen




Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net