免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2602 | 回复: 1
打印 上一主题 下一主题

[C++] 求高手解决list remove崩溃问题 [复制链接]

论坛徽章:
1
2015年迎新春徽章
日期:2015-03-04 10:16:53
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2015-03-18 15:44 |显示全部楼层 |倒序浏览
今天循坏跑程序,出现这个错误,求高手解答错误是怎么引起的?


Core was generated by `./audit'.
Program terminated with signal 11, Segmentation fault.
#0  0x08053437 in std::list<Thread*, std::allocator<Thread*> >::remove (this=0x82ff0c0, __value=@0xb2540394)
    at /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/list.tcc:182
182                  if (*__first == __value)
(gdb) bt
#0  0x08053437 in std::list<Thread*, std::allocator<Thread*> >::remove (this=0x82ff0c0, __value=@0xb2540394)
    at /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/list.tcc:182
#1  0x080532ed in ThreadPool::RemoveThread (this=0x82ff008, thread=0x83023a0) at threadpool.cpp:307
#2  0x080533b9 in ThreadPool::WapperFun (arg=0x83023a0) at threadpool.cpp:239
#3  0x006fb2db in start_thread () from /lib/libpthread.so.0
#4  0x0065514e in clone () from /lib/libc.so.6
Current language:  auto; currently c++

论坛徽章:
1
2015年迎新春徽章
日期:2015-03-04 10:16:53
2 [报告]
发表于 2015-03-18 16:14 |显示全部楼层
回复 2# hellioncu

求高手解答,出现这种错误,直接原因,是因为list 里指针改变了吗


   
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP