0x40b178e4 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
(gdb) info threads 
  Id   Target Id         Frame 
  15   Thread 0x41f74330 (LWP 2012) "remote-viewer" 0x40b8ad22 in poll () from /lib/arm-linux-gnueabihf/libc.so.6
  14   Thread 0x42774330 (LWP 2017) "usb_ev_thread" 0x40b8ad22 in poll () from /lib/arm-linux-gnueabihf/libc.so.6
  13   Thread 0x430ff330 (LWP 2018) "socket_th_1" 0x40af25f4 in __libc_do_syscall () from /lib/arm-linux-gnueabihf/libpthread.so.0
  12   Thread 0x43aff330 (LWP 2019) "gmain" 0x40b8ad22 in poll () from /lib/arm-linux-gnueabihf/libc.so.6
  11   Thread 0x444ff330 (LWP 2024) "socket_th_9" 0x40af25f4 in __libc_do_syscall () from /lib/arm-linux-gnueabihf/libpthread.so.0
  10   Thread 0x45120330 (LWP 2025) "socket_th_9" 0x40af25f4 in __libc_do_syscall () from /lib/arm-linux-gnueabihf/libpthread.so.0
  9    Thread 0x45920330 (LWP 2026) "socket_th_9" 0x40af25f4 in __libc_do_syscall () from /lib/arm-linux-gnueabihf/libpthread.so.0
  8    Thread 0x461c3330 (LWP 2027) "socket_th_9" 0x40af25f4 in __libc_do_syscall () from /lib/arm-linux-gnueabihf/libpthread.so.0
  7    Thread 0x46a0c330 (LWP 2028) "socket_th_9" 0x40af25f4 in __libc_do_syscall () from /lib/arm-linux-gnueabihf/libpthread.so.0
  6    Thread 0x472a8330 (LWP 2029) "socket_th_5" 0x40af25f4 in __libc_do_syscall () from /lib/arm-linux-gnueabihf/libpthread.so.0
  5    Thread 0x47b39330 (LWP 2030) "socket_th_6" 0x40af25f4 in __libc_do_syscall () from /lib/arm-linux-gnueabihf/libpthread.so.0
  4    Thread 0x483d3330 (LWP 2031) "socket_th_2" 0x40af25f4 in __libc_do_syscall () from /lib/arm-linux-gnueabihf/libpthread.so.0
  3    Thread 0x49441330 (LWP 2032) "socket_th_3" 0x40af25f4 in __libc_do_syscall () from /lib/arm-linux-gnueabihf/libpthread.so.0
  2    Thread 0x4a061330 (LWP 2033) "socket_th_4" 0x40af25f4 in __libc_do_syscall () from /lib/arm-linux-gnueabihf/libpthread.so.0
* 1    Thread 0x41750000 (LWP 2004) "remote-viewer" 0x40b178e4 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
(gdb) bt
#0  0x40b178e4 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
#1  0x40b9cd94 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

解决方案 »

  1.   

    如果是栈破坏的话,通过gdb是无法定位的, 可以使用 valgrind等内存检测工具运行你的程序来找问题
      

  2.   

    您好,我通过gdb大概可以了解到,应该是我的进程处于poll函数的这段呈现??状态,这个时候还出现了*** Error in `./remote-viewer': malloc(): memory corruption: 0x0018a958 ***,我在arm环境下使用valgrind很麻烦,也没弄成功,不知道还有其他的方法吗或者还有其他的可能出错的地方吗,谢谢
      

  3.   

    malloc(): memory corruption 这个提示就很明确了, 你malloc申请的某段内存, 但是这段内存的管理结构被破坏了,
    需要找一下malloc的内存的所有操作, 是否有拷贝(包含初始化/打印等)溢出的情况