|
Boost : |
From: Phil Bouchard (philippe_at_[hidden])
Date: 2008-07-08 01:46:19
"Chris Newbold" <Chris.Newbold_at_[hidden]> wrote in message
news:6F6A2FC198A0F943ACC2259C38A2E30B6688EDD1B4_at_EXCHANGE-AH.ad.mathworks.com...
[...]
> Just for grins, try printing a message out from the destructor of
> owned_base::pool (or setting a breakpoint there) and see how many times
> you wind up there. My hunch is that this is an ODR issue...
I get the following:
...
virtual boost::detail::sh::owned_base::~owned_base(): 1997
virtual boost::detail::sh::owned_base::~owned_base(): 1998
virtual boost::detail::sh::owned_base::~owned_base(): 1999
0
1
1
virtual boost::detail::sh::owned_base::~owned_base(): 2000
1
test = 5
virtual boost::detail::sh::owned_base::~owned_base(): 2001
0
0
Segmentation fault
BTW I have gotten the same problem by using Gcc 4.3 and I am not linking
multiple source files. Here is my build process:
$ g++ shifted_ptr_test2.cpp -I ../../..
Regards,
-Phil
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk