You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Alan Conway <ac...@redhat.com> on 2012/04/11 16:47:48 UTC

C++: unit_test crashing on exit.

Suddenly unit_test has started to crash on exit for me. Is anyone else having 
problems?

Its a seg fault after all the tests have run, in static destructors for the 
boost library:

#0  0x0000003e0807a5ac in free () from /lib64/libc.so.6
#1  0x00000036896671ac in clear (this=0x36898bd620, __in_chrg=<value optimized out>)
     at /usr/src/debug/boost-1.41.0.cmake0/boost/test/impl/framework.ipp:133
#2  boost::unit_test::framework_impl::~framework_impl (this=0x36898bd620,
     __in_chrg=<value optimized out>)
     at /usr/src/debug/boost-1.41.0.cmake0/boost/test/impl/framework.ipp:122
#3  0x0000003e08035d92 in exit () from /lib64/libc.so.6
#4  0x0000003e0801ece4 in __libc_start_main () from /lib64/libc.so.6
#5  0x0000000000402c29 in _start ()

I'm pretty sure I've seen something like this before but I don't remember the 
cure. Anybody have an idea?

Cheers,
Alan,

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Re: C++: unit_test crashing on exit.

Posted by Alan Conway <ac...@redhat.com>.
On 04/11/2012 10:47 AM, Alan Conway wrote:
> Suddenly unit_test has started to crash on exit for me. Is anyone else having
> problems?
>
> Its a seg fault after all the tests have run, in static destructors for the
> boost library:
>
> #0 0x0000003e0807a5ac in free () from /lib64/libc.so.6
> #1 0x00000036896671ac in clear (this=0x36898bd620, __in_chrg=<value optimized out>)
> at /usr/src/debug/boost-1.41.0.cmake0/boost/test/impl/framework.ipp:133
> #2 boost::unit_test::framework_impl::~framework_impl (this=0x36898bd620,
> __in_chrg=<value optimized out>)
> at /usr/src/debug/boost-1.41.0.cmake0/boost/test/impl/framework.ipp:122
> #3 0x0000003e08035d92 in exit () from /lib64/libc.so.6
> #4 0x0000003e0801ece4 in __libc_start_main () from /lib64/libc.so.6
> #5 0x0000000000402c29 in _start ()
>
> I'm pretty sure I've seen something like this before but I don't remember the
> cure. Anybody have an idea?
>

Now I remember: this happens on some versions of boost if you set MALLOC_PRETUB_ 
in your environment. MALLOC_PRETURB_ tells malloc to write over all deleted 
memory with a byte of your choosing, it catches some memory errors and makes it 
easy to see if some code is using deleted memory. Its exposing a bug in the 
boost test framework.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Re: C++: unit_test crashing on exit.

Posted by Gordon Sim <gs...@redhat.com>.
On 04/11/2012 03:47 PM, Alan Conway wrote:
> Suddenly unit_test has started to crash on exit for me. Is anyone else
> having problems?

No, I'm not seeing that.

> Its a seg fault after all the tests have run, in static destructors for
> the boost library:
>
> #0 0x0000003e0807a5ac in free () from /lib64/libc.so.6
> #1 0x00000036896671ac in clear (this=0x36898bd620, __in_chrg=<value
> optimized out>)
> at /usr/src/debug/boost-1.41.0.cmake0/boost/test/impl/framework.ipp:133
> #2 boost::unit_test::framework_impl::~framework_impl (this=0x36898bd620,
> __in_chrg=<value optimized out>)
> at /usr/src/debug/boost-1.41.0.cmake0/boost/test/impl/framework.ipp:122
> #3 0x0000003e08035d92 in exit () from /lib64/libc.so.6
> #4 0x0000003e0801ece4 in __libc_start_main () from /lib64/libc.so.6
> #5 0x0000000000402c29 in _start ()
>
> I'm pretty sure I've seen something like this before but I don't
> remember the cure. Anybody have an idea?
>
> Cheers,
> Alan,
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
> For additional commands, e-mail: dev-help@qpid.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org