analysis.py 文件源码

python
阅读 33 收藏 0 点赞 0 评论 0

项目:dumpling 作者: Microsoft 项目源码 文件源码
def analyze(self, dictProps, dictArgs):
        _dbg_write('RUNNING HEAP CORRUPTION ANALYZE')
        if 'FOLLOW_UP' in dictProps and dictProps['FOLLOW_UP'] == 'heap_corruption':
            #check if there is a stack walker frame on the faulting stack
            _dbg_write('HEAP CORRUPTION IS PRESENT')

            stackWalkFrame = g_dbg.get_first_frame('Thread::StackWalkFramesEx')
            if stackWalkFrame is not None:
                tid = g_dbg.eval_uint(stackWalkFrame,'this->m_OSThreadId')

                if not tid == 0:
                    thread = g_dbg.target.GetProcess().GetThreadByID(tid)
                    dictProps['CORRUPT_ROOT_THREAD'] = str(thread)

                pc = self._find_walker_pc_as_uint()
                pcHex = string.rstrip(hex(pc), 'L')
                dictProps['CORRUPT_ROOT_FRAME_PC'] = pcHex
                sos = SosInterpreter()
                dictProps['CORRUPT_ROOT_FRAME'] = sos.get_symbol(pcHex)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号