std::list.pop_back() 弹空了列表导致的崩溃

core文件输出:

(gdb) bt
#0  0x0000003143c0c69c in pthread_kill () from /lib64/libpthread.so.0
#1  0x00000000006643f2 in handle_fatal_signal (sig=6) at xxxxx/sql/signal_handler.cc:247
#2  <signal handler called>
#3  0x00000031434328a5 in raise () from /lib64/libc.so.6
#4  0x0000003143434085 in abort () from /lib64/libc.so.6
#5  0x00000031434707b7 in __libc_message () from /lib64/libc.so.6
#6  0x00000031434760e6 in malloc_printerr () from /lib64/libc.so.6
#7  0x00000000007d680d in deallocate (this=0x13df740, stKey=..., pBlock=0x7f53ac102d50)
    at /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/ext/new_allocator.h:95
#8  _M_put_node (this=0x13df740, stKey=..., pBlock=0x7f53ac102d50) at /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/bits/stl_list.h:320
#9  _M_erase (this=0x13df740, stKey=..., pBlock=0x7f53ac102d50) at /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/bits/stl_list.h:1431
#10 pop_back (this=0x13df740, stKey=..., pBlock=0x7f53ac102d50) at /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/bits/stl_list.h:946
#11 MY_CODE......................................

 

自己的代码就是在弹出list里的东西。调查后发现是列表为空了还继续想弹,就完蛋了。

 

posted @ 2014-01-10 10:10  双子靓星  阅读(514)  评论(0编辑  收藏  举报