期刊导航

论文摘要

基于有限状态机的指针解引用静态检测方法

Static Pointer Dereference Checking Method Based on Finite-state Machine

作者:詹瑾瑜(电子科技大学 计算机科学与工程学院;电子科技大学 信息与软件工程学院);陈忠湘(电子科技大学 信息与软件工程学院);郝宗波(电子科技大学 计算机科学与工程学院;电子科技大学 信息与软件工程学院)

Author:Zhan Jinyu(School of Computer Sci. and Eng., Univ.of Electronic Sci. and Technol. of China;School of Info. and Software Eng.,Univ. of Electronic Sci. and Technol. of China);Chen Zhongxiang(School of Info. and Software Eng.,Univ. of Electronic Sci. and Technol. of China);Hao Zongbo(School of Computer Sci. and Eng., Univ.of Electronic Sci. and Technol. of China;School of Info. and Software Eng.,Univ. of Electronic Sci. and Technol. of China)

收稿日期:2010-07-27          年卷(期)页码:2011,43(4):135-142

期刊名称:工程科学与技术

Journal Name:Advanced Engineering Sciences

关键字:有限状态机;指针解引用;指针状态;延迟写入;内存释放异常

Key words:finite-state machine;pointer dereference;pointer state;delayed writing;bad deallocation

基金项目:国家核高基重大专项资助项目(2009ZX01039-003-001-002);国家自然科学基金面上资助项目(60973016);电子科技大学中央高校基本科研业务费专项资金资助项目(ZYGX2009J062)

中文摘要

为了产生高质量和高可靠性代码,提出一种指针解引用静态检测方法,该方法给出了指针状态转换的有限状态机定义。通过对源代码进行语义分析,得到指针指向信息,建立指针与内存单元之间的映射关系,并根据有限状态机中的指针状态判断指针解引用是否合法。本方法不仅记录了变量的作用域和指针集,还分析了指针的确定指向和可能指向,并对部分控制块采取延迟写入指向的方法,提高了指针解引用分析的精度,同时还可以检测内存释放异常的问题。实验结果表明该方法能有效检测非法指针解引用和内存释放异常。

英文摘要

In order to produce a code with high quality and high reliability, a static pointer dereference checking method was presented, and the definition of the finite-state machine for pointer-state transition was given. The point-to information was gotten and the mapping relationship between pointer and memory unit was built through semantic analysis of source codes to judge whether it was legal to use the pointer according to the pointer-state in the finite-state machine. This method not only recorded the scope and pointer sets of the variable, but also analyzed point-to including the definite and the possible. And the method of delayed writing point-to to partial control blocks was applied to increase the efficiency of pointer dereference analysis and to detect the problem of the bad deallocation. Results of experimentation showed that this method can detect invalid pointer dereference and bad deallocation effectively.

关闭

Copyright © 2020四川大学期刊社 版权所有.

地址:成都市一环路南一段24号

邮编:610065