Boost logo

Boost Users :

From: Stephen Torri (storri_at_[hidden])
Date: 2007-03-22 22:31:21


On Fri, 2007-03-23 at 02:46 +0200, Peter Dimov wrote:
> Yes, there are a bunch of assertions in sp_debug_hooks that attempt to catch
> heap- and shared_ptr-related errors. Make sure you don't #define NDEBUG,
> though.

I have a personal define called DEBUG will that be a problem?

> If the asserts don't trigger, your problem might be deeper than a simple
> invalid use of shared_ptr. If you post a backtrace/call stack of one of your
> crashes, we may be able to help.

Ok. Here is one crash that occurs pretty much immediately after a
function is called in the library. The crash is occurring when the
library is trying to parse a XML file containing configuration
information.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1209059632 (LWP 29966)]
0x0069dce9 in operator delete[] (p=0x8) at sp_debug_hooks.cpp:224
224 BOOST_ASSERT(*pm != deleted); // double delete
(gdb) bt
#0 0x0069dce9 in operator delete[] (p=0x8) at sp_debug_hooks.cpp:224
#1 0x47ff0eb6 in std::ios_base::~ios_base$base () from /usr/lib/libstdc++.so.6
#2 0x006dbefd in boost::io::detail::put<char, std::char_traits<char>, std::allocator<char>, char const (&) [16]> (
    x=@0x7870cd, specs=@0x8e56268, res=@0x8e5626c, buf=@0xbfb2e220, loc_p=0x0)
    at /usr/include/boost/format/feed_args.hpp:227
#3 0x006dc05f in boost::io::detail::distribute<char, std::char_traits<char>, std::allocator<char>, char const (&) [16]> (
    self=@0xbfb2e1e8, x=@0x7870cd) at /usr/include/boost/format/feed_args.hpp:241
#4 0x006dc0be in boost::io::detail::feed<char, std::char_traits<char>, std::allocator<char>, char const (&) [16]> (
    self=@0xbfb2e1e8, x=@0x7870cd) at /usr/include/boost/format/feed_args.hpp:251
#5 0x006dc184 in boost::basic_format<char, std::char_traits<char>, std::allocator<char> >::operator%<char [16]> (
    this=0xbfb2e1e8, x=@0x7870cd) at /usr/include/boost/format/format_class.hpp:64
#6 0x006dab02 in libreverse::infrastructure::Parser_Base::parse_impl (this=0xbfb2e48c, file_ref=@0x8419c0)
    at Parser_Base.cpp:34
#7 0x006ccb69 in libreverse::infrastructure::Configuration_Parser::parse (this=0xbfb2e48c) at Configuration_Parser.cpp:26
#8 0x006d063e in libreverse::infrastructure::Configurator::Instance () at Configurator.cpp:29
#9 0x00770a79 in libreverse::infrastructure::Data_Source_Factory::Instance () at Data_Source_Factory.cpp:143
#10 0x006ba2ab in Component (this=0x8e548b8, id=0) at Component.cpp:36
#11 0x006b6c2d in Null_Component (this=0x8e548b8, id=0) at Null_Component.cpp:16
#12 0x006b4132 in libreverse::infrastructure::Component_Factory::get_Null_Component (this=0x8e54668, id=0)
    at Component_Factory.cpp:83
#13 0x006904a2 in libreverse::api::Reverse::execute (this=0xbfb2e9a8, target_file=@0x8e5453c, input_type=@0x805c8dc,
    output_type=@0x805c94c) at Reverse.cpp:67
#14 0x0804d9df in main (ac=Cannot access memory at address 0x1
) at reverse.cpp:50

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