Ticket #3476: report

File report, 6.8 KB (added by Dmitry Goncharov <dgoncharov@…>, 13 years ago)
Line 
1The following program triggers an assert in the debug mode of gnu stl.
2
3dgoncharov@localhost ~/asiobug $ cat main.cpp
4#include <unistd.h>
5#include <boost/asio/io_service.hpp>
6#include <boost/asio/posix/stream_descriptor.hpp>
7
8int main()
9{
10 boost::asio::io_service ios;
11 boost::asio::posix::stream_descriptor sd(ios);
12}
13
14
15dgoncharov@localhost ~/asiobug $
16dgoncharov@localhost ~/asiobug $ rm core
17dgoncharov@localhost ~/asiobug $ rm a.out
18dgoncharov@localhost ~/asiobug $ g++ -ggdb main.cpp -lboost_thread -lboost_system
19dgoncharov@localhost ~/asiobug $ ./a.out
20dgoncharov@localhost ~/asiobug $ g++ -ggdb -D_GLIBCXX_DEBUG main.cpp -lboost_thread -lboost_system
21dgoncharov@localhost ~/asiobug $ ./a.out
22/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.1/include/g++-v4/debug/safe_iterator.h:126:
23 error: attempt to copy-construct an iterator from a singular iterator.
24
25Objects involved in the operation:
26iterator "this" @ 0x0x7ffffe7bb9b0 {
27type = N11__gnu_debug14_Safe_iteratorINSt6__norm14_List_iteratorISt4pairIiPN5boost4asio6detail16reactor_op_queueIiE7op_baseEEEENSt7__debug4listISB_SaISB_EEEEE (mutable iterator);
28 state = singular;
29}
30iterator "other" @ 0x0x7ffffe7bbaa0 {
31type = N11__gnu_debug14_Safe_iteratorINSt6__norm14_List_iteratorISt4pairIiPN5boost4asio6detail16reactor_op_queueIiE7op_baseEEEENSt7__debug4listISB_SaISB_EEEEE (mutable iterator);
32 state = singular;
33}
34Aborted (core dumped)
35dgoncharov@localhost ~/asiobug $ gdb ./a.out ./core
36GNU gdb 6.8
37Copyright (C) 2008 Free Software Foundation, Inc.
38License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
39This is free software: you are free to change and redistribute it.
40There is NO WARRANTY, to the extent permitted by law. Type "show copying"
41and "show warranty" for details.
42This GDB was configured as "x86_64-pc-linux-gnu"...
43
44warning: Can't read pathname for load map: Input/output error.
45Reading symbols from /usr/lib64/libboost_thread-mt-1_39.so.1.39.0...done.
46Loaded symbols for /usr/lib/libboost_thread-mt-1_39.so.1.39.0
47Reading symbols from /usr/lib64/libboost_system-1_39.so.1.39.0...done.
48Loaded symbols for /usr/lib/libboost_system-1_39.so.1.39.0
49Reading symbols from /usr/lib64/gcc/x86_64-pc-linux-gnu/4.4.1/libstdc++.so.6...done.
50Loaded symbols for /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.1/libstdc++.so.6
51Reading symbols from /lib64/libm.so.6...done.
52Loaded symbols for /lib/libm.so.6
53Reading symbols from /lib64/libgcc_s.so.1...done.
54Loaded symbols for /lib/libgcc_s.so.1
55Reading symbols from /lib64/libc.so.6...done.
56Loaded symbols for /lib/libc.so.6
57Reading symbols from /lib64/libpthread.so.0...done.
58Loaded symbols for /lib/libpthread.so.0
59Reading symbols from /lib64/librt.so.1...done.
60Loaded symbols for /lib/librt.so.1
61Reading symbols from /lib64/ld-linux-x86-64.so.2...done.
62Loaded symbols for /lib64/ld-linux-x86-64.so.2
63Core was generated by `./a.out'.
64Program terminated with signal 6, Aborted.
65[New process 25569]
66#0 0x00007f0e8c3b6405 in raise () from /lib/libc.so.6
67(gdb) info thr
68* 1 process 25569 0x00007f0e8c3b6405 in raise () from /lib/libc.so.6
69(gdb) bt
70#0 0x00007f0e8c3b6405 in raise () from /lib/libc.so.6
71#1 0x00007f0e8c3b8013 in abort () from /lib/libc.so.6
72#2 0x00007f0e8cbff0e3 in __gnu_debug::_Error_formatter::_M_error () from /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.1/libstdc++.so.6
73#3 0x00000000004097fb in _Safe_iterator (this=0x7ffffe7bb9b0, __x=@0x7ffffe7bbaa0) at /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.1/include/g++-v4/debug/safe_iterator.h:123
74#4 0x000000000040d288 in bucket_type (this=0x7ffffe7bb9b0) at /usr/include/boost/asio/detail/hash_map.hpp:277
75#5 0x000000000040de98 in std::__debug::vector<boost::asio::detail::hash_map<int, boost::asio::detail::reactor_op_queue<int>::op_base*>::bucket_type, std::allocator<boost::asio::detail::hash_map<int, boost::asio::detail::reactor_op_queue<int>::op_base*>::bucket_type> >::resize (this=0x234c240, __sz=3, __c=
76 {first = {<__gnu_debug::_Safe_iterator_base> = {_M_sequence = 0x0, _M_version = 0, _M_prior = 0x0, _M_next = 0x0}, _M_current = {_M_node = 0x0}}, last = {<__gnu_debug::_Safe_iterator_base> = {_M_sequence = 0x0, _M_version = 0, _M_prior = 0x0, _M_next = 0x0}, _M_current = {_M_node = 0x0}}}) at /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.1/include/g++-v4/debug/vector:233
77#6 0x000000000040d33a in boost::asio::detail::hash_map<int, boost::asio::detail::reactor_op_queue<int>::op_base*>::rehash (this=0x234c1e8, num_buckets=3) at /usr/include/boost/asio/detail/hash_map.hpp:221
78#7 0x000000000040cad0 in hash_map (this=0x234c1e8) at /usr/include/boost/asio/detail/hash_map.hpp:67
79#8 0x000000000040bd03 in reactor_op_queue (this=0x234c1e0) at /usr/include/boost/asio/detail/reactor_op_queue.hpp:42
80#9 0x000000000040ac6a in epoll_reactor (this=0x234c180, io_service=@0x7ffffe7bbfa0) at /usr/include/boost/asio/detail/epoll_reactor.hpp:78
81#10 0x0000000000409dc3 in boost::asio::detail::service_registry::use_service<boost::asio::detail::epoll_reactor<false> > (this=0x234c010) at /usr/include/boost/asio/detail/service_registry.hpp:109
82#11 0x0000000000408e6c in boost::asio::use_service<boost::asio::detail::epoll_reactor<false> > (ios=@0x7ffffe7bbfa0) at /usr/include/boost/asio/impl/io_service.ipp:195
83#12 0x00000000004084f7 in reactive_descriptor_service (this=0x234c140, io_service=@0x7ffffe7bbfa0) at /usr/include/boost/asio/detail/reactive_descriptor_service.hpp:83
84#13 0x0000000000407923 in boost::asio::detail::service_registry::use_service<boost::asio::detail::reactive_descriptor_service<boost::asio::detail::epoll_reactor<false> > > (this=0x234c010)
85 at /usr/include/boost/asio/detail/service_registry.hpp:109
86#14 0x0000000000406b13 in boost::asio::use_service<boost::asio::detail::reactive_descriptor_service<boost::asio::detail::epoll_reactor<false> > > (ios=@0x7ffffe7bbfa0)
87 at /usr/include/boost/asio/impl/io_service.ipp:195
88#15 0x000000000040616d in stream_descriptor_service (this=0x234c100, io_service=@0x7ffffe7bbfa0) at /usr/include/boost/asio/posix/stream_descriptor_service.hpp:94
89#16 0x000000000040a081 in boost::asio::detail::service_registry::use_service<boost::asio::posix::stream_descriptor_service> (this=0x234c010) at /usr/include/boost/asio/detail/service_registry.hpp:109
90#17 0x0000000000409098 in boost::asio::use_service<boost::asio::posix::stream_descriptor_service> (ios=@0x7ffffe7bbfa0) at /usr/include/boost/asio/impl/io_service.ipp:195
91#18 0x00000000004087bd in basic_io_object (this=0x7ffffe7bbf90, io_service=@0x7ffffe7bbfa0) at /usr/include/boost/asio/basic_io_object.hpp:72
92#19 0x0000000000407b2f in basic_descriptor (this=0x7ffffe7bbf90, io_service=@0x7ffffe7bbfa0) at /usr/include/boost/asio/posix/basic_descriptor.hpp:63
93#20 0x0000000000406c47 in basic_stream_descriptor (this=0x7ffffe7bbf90, io_service=@0x7ffffe7bbfa0) at /usr/include/boost/asio/posix/basic_stream_descriptor.hpp:68
94#21 0x00000000004038cf in main () at main.cpp:9
95(gdb)
96