The attached program compiles perfectly when compiled against the LyX 1.3.x
and 1.4.x versions of Boost, but segfaults when the 1.4.x version is run.
At least, it does here
I don't think that this is too controversial, is it?
int main()
{
boost::signal<void ()> sig;
return 0;
}
This is with the FC3 compiler g++ 3.4.2.
Could someone running FC3 confirm?
I find that all behaves as it should on a Linux/Alpha machine
using g++ 3.3.5.
$ g++ -fno-exceptions -g -Ilyx/13x/boost -o trial2 trial2.cpp \
-Llyx/13x/build-xforms/boost/libs/signals/src/.libs -lboostsignals
$ g++ -fno-exceptions -g -Ilyx/devel/boost -o trial2 trial2.cpp \
-Llyx/devel/build/boost/libs/signals/src/.libs -lboost_signals
$ gdb ./trial2
(gdb) r
Starting program: /home/angus/trial2
Program received signal SIGSEGV, Segmentation fault.
0x0014f4af in __gnu_debug::_Safe_iterator_base::_M_detach ()
from /usr/lib/libstdc++.so.6
(gdb) where
#0 0x0014f4af in __gnu_debug::_Safe_iterator_base::_M_detach ()
from /usr/lib/libstdc++.so.6
#1 0x0014f517 in __gnu_debug::_Safe_iterator_base::_M_attach ()
from /usr/lib/libstdc++.so.6
#2 0x0014f5bc in __gnu_debug::_Safe_sequence_base::_M_detach_all ()
from /usr/lib/libstdc++.so.6
#3 0x0804af4f in ~list (this=0xbfe19108) at safe_base.h:170
#4 0x0804ae93 in ~trackable (this=0xfe8988)
at ../../../../../boost/libs/signals/src/trackable.cpp:51
#5 0x080495a3 in ~signal0 (this=0xbfe19100) at trial2.cpp:7
#6 0x08049589 in ~signal (this=0xbfe19100) at trial2.cpp:7
#7 0x080493e7 in main () at trial2.cpp:8
--
Angus
#include <boost/shared_ptr.hpp>
#include <boost/signal.hpp>
#include <iostream>
int main()
{
boost::signal<void ()> sig;
return 0;
}
namespace boost {
void throw_exception(std::exception const & e)
{
std::cerr << "Exception caught:\n"
<< e.what() << std::endl;
BOOST_ASSERT(false);
}
void assertion_failed(char const * expr, char const * function,
char const * file, long line)
{
std::cerr << "Assertion triggered in " << function
<< " by failing check \"" << expr << "\""
<< " in file " << file << ":" << line << std::endl;
::abort();
}
} // namespace boost