首页 > 其他 > 详细

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

时间:2014-01-14 21:25:44      阅读:857      评论:0      收藏:0      [点我收藏+]

core文件输出:

bubuko.com,布布扣
(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......................................
bubuko.com,布布扣

 

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

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

原文:http://www.cnblogs.com/szlx/p/core_for_empty_list_pop_back.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!