[Quickfix-developers] QF 1.5.0: core dump running unit tests
Brought to you by:
orenmnero
|
From: Joerg T. <Joe...@ma...> - 2003-07-02 15:36:05
|
Hello,
finally I compiled QF 1.5.0 using GCC 3.0 (we had a busy time...) and
all went fine -- unit I ran the unit tests:
$ ./runut 9999
<ut>
<output>
.....................................................................................F./runut:
line 6: 24178 Segmentation fault (core dumped) bin/ut -p $1
Looking into the core:
$ gdb src/.libs/lt-ut core
GNU gdb 2002-04-01-cvs
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-linux"...
Core was generated by `lt-ut -p 9999'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from
/home/joerg/tmp/quickfix-1.5.0/quickfix/src/C++/.libs/libquickfix.so.0...done.
Loaded symbols for
/home/joerg/tmp/quickfix-1.5.0/quickfix/src/C++/.libs/libquickfix.so.0
Reading symbols from /lib/libpthread.so.0...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /usr/lib/libxml2.so.2...done.
Loaded symbols for /usr/lib/libxml2.so.2
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /usr/lib/libstdc++.so.3...done.
Loaded symbols for /usr/lib/libstdc++.so.3
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
#0 0x40085ed4 in FIX::SocketMonitor::~SocketMonitor() (this=0x40260dac)
at SocketMonitor.cpp:79
79 {
(gdb) where
#0 0x40085ed4 in FIX::SocketMonitor::~SocketMonitor() (this=0x40260dac)
at SocketMonitor.cpp:79
#1 0x081043f1 in
FIX::ParserTestCase::readFromSocket::onTeardown(FIX::Parser*)
(this=0x81a27c0, pObject=0x0)
at ParserTestCase.h:125
#2 0x0810461c in
CPPTest::Test<FIX::Parser>::teardown(CPPTest::TestDisplay&)
(this=0xbfffdeac, testDisplay=@0x81b3970)
at ../../../CPPTest/Test.h:58
#3 0x0807551e in
CPPTest::TestCase<FIX::Parser>::run(CPPTest::TestDisplay&)
(this=0xbfffde3c, testDisplay=@0x81b3970)
at ../CPPTest/TestCase.h:45
#4 0x0805bab0 in CPPTest::TestSuite::run() (this=0xbfff8a34) at
../CPPTest/TestSuite.h:33
#5 0x08059338 in main (argc=3, argv=0xbfffee14) at ut.cpp:78
(gdb) list
74 m_ticks = clock();
75 #endif
76 }
77
78 SocketMonitor::~SocketMonitor()
79 {
80 Sockets::iterator i;
81 for ( i = m_sockets.begin(); i != m_sockets.end(); ++i )
82 socket_close( *i );
83
(gdb) print this
$1 = (SocketMonitor *) 0x40260dac
(gdb) print *this
$2 = {_vptr.SocketMonitor = 0x6362696c, m_timeout = 779055918, m_timeval
= {tv_sec = 1768685622, tv_usec = 1667458914},
m_ticks = 1932424031, m_sockets = {
_M_t = {<_Rb_tree_base<int,std::allocator<int> >> =
{<_Rb_tree_alloc_base<int,std::allocator<int>,true>> = {
_M_header = 0x312e6f}, <No data fields>}, _M_node_count =
1112099911,
_M_key_compare = {<binary_function<int,int,bool>> = {<No data
fields>}, <No data fields>}}}, m_dropped = {
c = {<_Deque_base<int,std::allocator<int> >> =
{<_Deque_alloc_base<int,std::allocator<int>,true>> = {
_M_map = 0x43470030, _M_map_size = 775118659}, _M_start =
{_M_cur = 0x4c470030, _M_first = 0x5f434249,
_M_last = 0x2e312e32, _M_node = 0x33}, _M_finish = {_M_cur =
0x0, _M_first = 0x0, _M_last = 0x0,
_M_node = 0x0}}, <No data fields>}}}
(gdb) print i
$3 = {<_Rb_tree_base_iterator> = {_M_node = 0xbfff87f8}, <No data fields>}
(gdb) up
#1 0x081043f1 in
FIX::ParserTestCase::readFromSocket::onTeardown(FIX::Parser*)
(this=0x81a27c0, pObject=0x0)
at ParserTestCase.h:125
125 delete m_pServer; delete m_pConnector;
(gdb)
#2 0x0810461c in
CPPTest::Test<FIX::Parser>::teardown(CPPTest::TestDisplay&)
(this=0xbfffdeac, testDisplay=@0x81b3970)
at ../../../CPPTest/Test.h:58
58 onTeardown(m_pObject);
(gdb)
The core appears on entry to the SocketMonitor destructor. May this be
a compiler problem? Any ideas are welcome.
In the meantime, I try to do this with the GCC 3.2.
Cheers, Jörg
--
Joerg Thoennes
http://macd.com
Tel.: +49 (0)241 44597-24 Macdonald Associates GmbH
Fax : +49 (0)241 44597-10 Lothringer Str. 52, D-52070 Aachen
|