Boost logo

Boost Users :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-11-24 04:02:22


Will Bryant wrote:

> Here's one to produce my segfault, which may or may not be the same as
> yours:
>
> #include <boost/program_options.hpp>
> #include <iostream>
>
> int main(int argc, char* argv[])
> {
> try
> {
> boost::program_options::options_description desc("Test");
> desc.add_options()("test",
> boost::program_options::value<std::string>(),
> "import the specified OBJ file and save it to MDLM format");
> std::cerr << desc;
> return 0;
> }
> catch (const std::exception& except)
> {
> std::cerr << except.what() << std::endl;
> return 1;
> }
> }
>
> As per my message the other day, this triggers a bug in
> options_description.cpp's format_paragraph function, which causes a
> segfault on linux with g++ 4.0.2 (and an assertion failure on Visual
> Studio 2005 beta 2); running it under valgrind 2.4.0 on linux produces:

Can you replace options_description.cpp with

   http://zigzag.cs.msu.su/~ghost/options_description.cpp

And try again. The problem is that I can't reproduce the problem myself,
neither with valgrind nor with libstdc++ debug mode, so I rely on users to
tell if it's gone.

- Volodya


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