我有这样的输出试图调试使用Valgrind工具如何检测试图访问0x0地址的对象?
计划接收信号SIGSEGV时,在
在
的std :: string段错误0x43989029 ::比较(此= 0x88fd430,__str = @ 0xbfff9060) /家/ devsw/tmp/objdir/i686-pc-linux-gnu/libstdC++ -v3/include/bits/char_traits.h:253253 {return memcmp(__ s1,__s2,__n); }
当前语言:auto;目前C++
使用的valgrind会收到这个输出
== 12485个==过程与信号的默认动作11(SIGSEGV)结束
== 12485用于映射区域==为在权限地址0x0
== == 12485在为0x1:(path_to_my_executable_file/executable_file内)
它看起来像是在调用string :: compare() – Stephen 2010-04-08 17:00:02