Boost.Test segfault clang++3.3 macports cmake

I am getting a segmentation fault when attempting to use Boost.Test. I
suspect that I don't have something set up correctly -- your assistance in
remedying this would be appreciated. I am using clang++-mp-3.3 as
installed by MacPorts on OS X 10.8.4. Here's the crash, which occurs after
Boost.Test reports "*** No errors detected".
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: 13 at address: 0x0000000000000000
0x000000010006f6d6 in boost::unit_test::test_unit::~test_unit ()
(gdb) bt
#0 0x000000010006f6d6 in boost::unit_test::test_unit::~test_unit ()
#1 0x000000010003bb5f in
boost::unit_test::master_test_suite_t::~master_test_suite_t ()
#2 0x000000010003bcdd in boost::unit_test::framework_impl::~framework_impl
()
#3 0x00007fff8f465307 in __cxa_finalize ()
#4 0x00007fff8f466f57 in exit ()
#5 0x00007fff96ddc7e8 in start ()
(gdb)
Here's a somewhat simplified version of what I have:
==== UseBoostUnitTestFramework.hpp ====
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wall"
#pragma clang diagnostic ignored "-Wdisabled-macro-expansion"
#pragma clang diagnostic ignored "-Wexit-time-destructors"
#pragma clang diagnostic ignored "-Wextra-semi"
#pragma clang diagnostic ignored "-Wglobal-constructors"
#pragma clang diagnostic ignored "-Wmissing-prototypes"
#pragma clang diagnostic ignored "-Wsign-conversion"
#pragma clang diagnostic ignored "-Wundef"
#pragma clang diagnostic ignored "-Wweak-vtables"
#include

[Please do not mail me a copy of your followup]
boost-users@lists.boost.org spake the secret code
I am getting a segmentation fault when attempting to use Boost.Test.
What version of boost are you using?
====Foo1.unit_tests.cpp ====
#include "Foo1.hpp" #include <string>
#pragma clang diagnostic push #pragma clang diagnostic ignored "-Wglobal-constructors"
#include "UseBoostUnitTestFramework.hpp"
BOOST_AUTO_TEST_SUITE(Bar1)
BOOST_AUTO_TEST_CASE(foobar1) { BOOST_CHECK_EQUAL(std:string("a"), std::string("a")); }
BOOST_AUTO_TEST_CASE(foobar2) { BOOST_CHECK_EQUAL(true, true); }
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_SUITE(Bar2)
BOOST_AUTO_TEST_CASE(barfoo1) { BOOST_CHECK_EQUAL(1, 1); }
BOOST_AUTO_TEST_CASE(barfoo2) { BOOST_CHECK_EQUAL(0, 0); }
BOOST_AUTO_TEST_SUITE_END()
#pragma clang diagnostic pop
Are all of these test cases/suites necessary to reproduce the crash? Do you get the crash if you have a single test case and no test suite? Do you get the crash if you hav ea single test case inside a single suite? -- "The Direct3D Graphics Pipeline" free book http://tinyurl.com/d3d-pipeline The Computer Graphics Museum http://computergraphicsmuseum.org The Terminals Wiki http://terminals.classiccmp.org Legalize Adulthood! (my blog) http://legalizeadulthood.wordpress.com

Dave Gomboc
I am getting a segmentation fault when attempting to use Boost.Test. I suspect that I don't have something set up correctly -- your assistance in remedying this would be appreciated. I am using clang++-mp-3.3 as installed by MacPorts on OS X 10.8.4. Here's the crash, which occurs after Boost.Test reports "*** No errors detected".
Was this ever resolved? Is this happening? Gennadiy
participants (3)
-
Dave Gomboc
-
Gennadiy Rozental
-
legalize+jeeves@mail.xmission.com