日期:2014-05-16  浏览次数:20584 次

程序core了,查不出原因啊
Program terminated with signal 11, Segmentation fault.
#0  0x006077f9 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::size() const ()from /usr/lib/libstdc++.so.6
(gdb) where
#0  0x006077f9 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::size() const () from /usr/lib/libstdc++.so.6
c++?gdb??core?

------解决方案--------------------
gdb 跟踪下呗...肯定哪里越界了

------解决方案--------------------
大多数情况下是:
往受到系统保护的内存地址写数据;
指针使用前未判断是否为NULL,而误用NULL指针访问数据;
内存越界访问;

调试方法:
http://www.cnblogs.com/panfeng412/archive/2011/11/06/2237857.html