|
本帖最后由 zhikliao 于 2014-10-9 22:50 编辑
各位大侠好,小弟学习PCL时遇到以下问题,求各位指点一下。
首先介绍背景:
系统:Ubuntu14.04,环境:Qt Creater,PCL版本:1.7。
在Qt中粘贴入代码后,编译通过,但是运行时会跳出。在debug模式下运行后提示SIGSEGV错误,但是跳入了一个汇编界面:
0x7fc2e4cb0de8 <+0x0000> scas %es:(%rdi),%eax
0x7fc2e4cb0de9 <+0x0000> add %al,(%rax)
0x7fc2e4cb0deb <+0x0000> add %al,(%rax)
0x7fc2e4cb0ded <+0x0000> add %al,%dh
0x7fc2e4cb0def <+0x0000> add $0xaf86fb,%eax
0x7fc2e4cb0df4 <+0x0000> add %cl,-0x77(%rax)
0x7fc2e4cb0df7 <+0x0000> add $0xaf86fc,%eax
0x7fc2e4cb0dfc <+0x0000> lock incl (%rax) (就在这一行跳出)
0x7fc2e4cb0dff <+0x0000> setne %dl
0x7fc2e4cb0e02 <+0x0000> mov %rsp,%rdi
0x7fc2e4cb0e05 <+0x0000> callq 0x7fc2e4cbee70
0x7fc2e4cb0e0a <+0x0000> lea 0xaf314f(%rip),%rdx # 0x7fc2e57a3f60
0x7fc2e4cb0e11 <+0x0000> lea 0xaf86c8(%rip),%rsi # 0x7fc2e57a94e0
0x7fc2e4cb0e18 <+0x0000> lea 0x19a241(%rip),%rdi # 0x7fc2e4e4b060
0x7fc2e4cb0e24 <+0x0000> add $0x18,%rsp
0x7fc2e4cb0e28 <+0x0000> retq
0x7fc2e4cb0e29 <+0x0000> nopl 0x0(%rax)
0x7fc2e4cb0e30 <+0x0000> sub $0x8,%rsp
0x7fc2e4cb0e34 <+0x0000> mov 0xaf86f6(%rip),%eax # 0x7fc2e57a9530
0x7fc2e4cb0e3a <+0x0000> test %eax,%eax
0x7fc2e4cb0e3c <+0x0000> jne 0x7fc2e4cb0e54
0x7fc2e4cb0e3e <+0x0000> lea 0x67e494(%rip),%rdi # 0x7fc2e532f2d9
0x7fc2e4cb0e45 <+0x0000> or $0xffffffffffffffff,%rsi
0x7fc2e4cb0e49 <+0x0000> callq 0x7fc2e4e77fe0
0x7fc2e4cb0e4e <+0x0000> mov %eax,0xaf86dc(%rip) # 0x7fc2e57a9530
0x7fc2e4cb0e54 <+0x0000> lea 0x67e47e(%rip),%rdi # 0x7fc2e532f2d9
0x7fc2e4cb0e5b <+0x0000> xor %esi,%esi
0x7fc2e4cb0e5d <+0x0000> mov 0xaf86cd(%rip),%eax # 0x7fc2e57a9530
下面还会提示"Note: Binary debug information is not accessible for this frame."等等。见图。
曾经在main函数的第一行设置断点,但是运行依然是老样子。
而在控制台直接运行编译好的程序时,提示的是“段错误 (核心已转储)”。
参考书的程序应该不会出现内存错误吧,难道是我使用的环境问题?希望各位大侠帮我看看。谢谢。
二楼贴上示例的代码。
|
|