Boost logo

Boost Users :

Subject: [Boost-users] segfault using boost test
From: David M. Lee (dlee_at_[hidden])
Date: 2010-11-08 15:19:33


I'm consistently getting segfaults trying to use boost test on my Mac. The test works fine on Linux.

This is Mac is running Snow Leopard. I compiled boost using Homebrew (http://mxcl.github.com/homebrew/; seehttps://github.com/mxcl/homebrew/blob/master/Library/Formula/boost.rb for the build formula), but I've also tried building Boost myself with the same results.

Any help figuring this out would be greatly appreciated!

Here's the test I'm running:

#define BOOST_TEST_MODULE simple
#include <boost/test/included/unit_test.hpp>

BOOST_AUTO_TEST_CASE(testSimple)
{
   BOOST_CHECK_EQUAL(true, true);
}

Here's the backtrace:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
0x0000000100265ccc in boost::unit_test::framework::get ()
(gdb) bt
#0 0x0000000100265ccc in boost::unit_test::framework::get ()
#1 0x0000000100270855 in boost::unit_test::results_collector_t::assertion_result ()
#2 0x00000001000242cf in boost::unit_test::framework::assertion_result ()
#3 0x00000001000262a6 in boost::test_tools::tt_detail::check_impl ()
#4 0x000000010006aa01 in boost::test_tools::tt_detail::check_frwd<boost::test_tools::tt_detail::equal_impl_frwd, bool, bool> ()
#5 0x0000000100026409 in testSimple::test_method ()
#6 0x0000000100026468 in testSimple_invoker ()
#7 0x000000010004056d in boost::unit_test::ut_detail::invoker<boost::unit_test::ut_detail::unused>::invoke<void (*)()> ()
#8 0x0000000100040591 in boost::unit_test::ut_detail::callback0_impl_t<boost::unit_test::ut_detail::unused, void (*)()>::invoke ()
#9 0x000000010005bf38 in boost::unit_test::callback0<boost::unit_test::ut_detail::unused>::operator() ()
#10 0x0000000100014698 in boost::unit_test::(anonymous namespace)::zero_return_wrapper_t<boost::unit_test::callback0<boost::unit_test::ut_detail::unused> >::operator() ()
#11 0x00000001000146b9 in boost::unit_test::ut_detail::invoker<int>::invoke<boost::unit_test::(anonymous namespace)::zero_return_wrapper_t<boost::unit_test::callback0<boost::unit_test::ut_detail::unused> > > ()
#12 0x00000001000146d9 in boost::unit_test::ut_detail::callback0_impl_t<int, boost::unit_test::(anonymous namespace)::zero_return_wrapper_t<boost::unit_test::callback0<boost::unit_test::ut_detail::unused> > >::invoke ()
#13 0x000000010005c65c in boost::unit_test::callback0<int>::operator() ()
#14 0x000000010005c6a7 in boost::detail::do_invoke<boost::scoped_ptr<boost::detail::translate_exception_base>, boost::unit_test::callback0<int> > ()
#15 0x00000001000206f1 in boost::execution_monitor::catch_signals ()
#16 0x00000001000218da in boost::execution_monitor::execute ()
#17 0x00000001000240a0 in boost::unit_test::unit_test_monitor_t::execute_and_translate ()
#18 0x000000010006b78d in boost::unit_test::framework_impl::visit ()
#19 0x0000000100008b2e in boost::unit_test::traverse_test_tree ()
#20 0x0000000100023753 in boost::unit_test::traverse_test_tree ()
#21 0x00000001000233a8 in boost::unit_test::traverse_test_tree ()
#22 0x000000010002376a in boost::unit_test::traverse_test_tree ()
#23 0x000000010002aad6 in boost::unit_test::framework::run ()
#24 0x000000010002ae39 in boost::unit_test::unit_test_main ()
#25 0x000000010002b0c2 in main ()

Thanks!
dave
<><

--
David M. Lee
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at:  www.digium.com  & www.asterisk.org


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