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里的东西。调查后发现是列表为空了还继续想弹,就完蛋了。

 

转载于:https://www.cnblogs.com/szlx/p/core_for_empty_list_pop_back.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值