• 【Coredump】调试之旅


    测试反馈,core了。

    拿到环境,发现6和11,一个是重复释放,一个是非法指针。

    用GDB一挂 ,发现

     1 GNU gdb (GDB) 7.5
     2 Copyright (C) 2012 Free Software Foundation, Inc.
     3 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
     4 This is free software: you are free to change and redistribute it.
     5 There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
     6 and "show warranty" for details.
     7 This GDB was configured as "XXX".
     8 For bug reporting instructions, please see:
     9 <http://www.gnu.org/software/gdb/bugs/>...
    10 Reading symbols from /usr/bin/XXX...(no debugging symbols found)...done.
    11 BFD: Warning: /tmp/core_XXX_11 is truncated: expected core file size >= 8536064, found: 5242880.

    然后看一下寄存器:

     1 (gdb) i r
     2                   zero               at               v0               v1
     3  R0   0000000000000000 ffffffff802308b8 000a0a0400000028 000000ffee98c8f8 
     4                     a0               a1               a2               a3
     5  R4   000a0a0400000029 000000012e96dda1 0000000000000004 000000012e96dda4 
     6                     a4               a5               a6               a7
     7  R8   0000000000000300 0000000000000000 000a130400000002 140400015b281504 
     8                     t0               t1               t2               t3
     9  R12  0000000000000000 1304000000021404 000000fff153f350 000000fffff002b0 
    10                     s0               s1               s2               s3
    11  R16  000000012e9723b0 0000000000000004 000a0a0400000028 00000000000000d0 
    12                     s4               s5               s6               s7
    13  R20  000000ffee9a4000 000000ffee98c8f0 0000000000000000 fffffffffffffffe 
    14                     t8               t9               k0               k1
    15  R24  000000fff15370f8 000000fff10f1af0 0000000000000000 0000000000000000 
    16                     gp               sp               s8               ra
    17  R28  000000fff03f0370 000000fffff00590 000000fffff005cc 000000fff03a2670 
    18                     sr               lo               hi              bad
    19       000000004000f8f3 0000000000000510 0000000000000000 000a0a0400000028 
    20                  cause               pc
    21       ffffffff8080000c 000000fff10f1bc4 
    22                    fsr              fir
    23               00000000         00000000 

    sp,ra都是非法指针,How to do?

  • 相关阅读:
    svn出现权限不足时的解决方法
    子线程简单实现(ZT)
    Ubuntu下安装Apache mysql php的命令
    修改主机名Ubuntu
    form:select form:options 标签数据回显
    form:select form:options 标签数据回显
    checkbox选择根据后台List数据进行回显
    checkbox选择根据后台List数据进行回显
    Java随机数
    Java随机数
  • 原文地址:https://www.cnblogs.com/gaoshaonian/p/11968896.html
Copyright © 2020-2023  润新知