memory leak detection based on memory state transition graph | |
Xu Zhenbo ; Zhang Jian ; Xu Zhongxing | |
2011 | |
会议名称 | 18th Asia Pacific Software Engineering Conference, APSEC 2011 |
会议日期 | December 5, 2011 - December 8, 2011 |
会议地点 | Ho Chi Minh, Viet nam |
关键词 | Algorithms Leak detection Software engineering Static analysis |
页码 | 33-40 |
中文摘要 | Memory leak is a common type of defect that is hard to detect manually. Existing memory leak detection tools suffer from lack of precise interprocedural alias and path conditions. To address this problem, we present a static interprocedural analysis algorithm, which captures memory actions and path conditions precisely, to detect memory leak in C programs. Our algorithm uses path-sensitive symbolic execution to track the memory actions in different program paths guarded by path conditions. A novel analysis model called Memory State Transition Graph (MSTG) is proposed to describe the tracking process and its results. An MSTG is generated from a procedure. Nodes in an MSTG contain states of memory objects which record the function behaviors precisely. Edges in an MSTG are annotated with path conditions collected by symbolic execution. The path conditions are checked for satisfiability to reduce the number of false alarms and the path explosion. In order to do interprocedural analysis, our algorithm generates a summary for each procedure from the MSTG and applies the summary at the procedure's call sites. Our implemented tool has found several memory leak bugs in some open source programs and detected more bugs than other tools in some programs from the SPEC2000 benchmarks. In some cases, our tool produces many false positives, but most of them are caused by the same code patterns which are easy to check. © 2011 IEEE. |
英文摘要 | Memory leak is a common type of defect that is hard to detect manually. Existing memory leak detection tools suffer from lack of precise interprocedural alias and path conditions. To address this problem, we present a static interprocedural analysis algorithm, which captures memory actions and path conditions precisely, to detect memory leak in C programs. Our algorithm uses path-sensitive symbolic execution to track the memory actions in different program paths guarded by path conditions. A novel analysis model called Memory State Transition Graph (MSTG) is proposed to describe the tracking process and its results. An MSTG is generated from a procedure. Nodes in an MSTG contain states of memory objects which record the function behaviors precisely. Edges in an MSTG are annotated with path conditions collected by symbolic execution. The path conditions are checked for satisfiability to reduce the number of false alarms and the path explosion. In order to do interprocedural analysis, our algorithm generates a summary for each procedure from the MSTG and applies the summary at the procedure's call sites. Our implemented tool has found several memory leak bugs in some open source programs and detected more bugs than other tools in some programs from the SPEC2000 benchmarks. In some cases, our tool produces many false positives, but most of them are caused by the same code patterns which are easy to check. © 2011 IEEE. |
收录类别 | EI |
会议录 | Proceedings - Asia-Pacific Software Engineering Conference, APSEC
![]() |
语种 | 英语 |
ISSN号 | 1530-1362 |
ISBN号 | 9780769546094 |
内容类型 | 会议论文 |
源URL | [http://ir.iscas.ac.cn/handle/311060/16279] ![]() |
专题 | 软件研究所_软件所图书馆_会议论文 |
推荐引用方式 GB/T 7714 | Xu Zhenbo,Zhang Jian,Xu Zhongxing. memory leak detection based on memory state transition graph[C]. 见:18th Asia Pacific Software Engineering Conference, APSEC 2011. Ho Chi Minh, Viet nam. December 5, 2011 - December 8, 2011. |
个性服务 |
查看访问统计 |
相关权益政策 |
暂无数据 |
收藏/分享 |
除非特别说明,本系统中所有内容都受版权保护,并保留所有权利。
修改评论