摘要
在航天领域中,安全关键的大型实时软件系统往往直接影响到任务成败,一般难以全面检测、分析或避免内存泄漏等常见内存错误。定义了实时软件的12种典型内存故障模式,提出了一种基于C++代码插装的实时软件内存错误快速分析方法。该方法通过对C++源代码进行静态分析,获取指针变量相关信息;通过C++代码插装和运行不同测试用例,实时收集统计C++指针对象的分配、释放、赋值、c-use和p-use使用情况,结合实时软件的典型内存故障模式进行分析,并自动生成详情报告。应用案例表明,该方法能够高效快捷地发现实时软件潜在的典型内存错误,从而有效提高软件质量。
In aerospace industry, safety-critical large-scale real-time software system has a direct impact on space launch missions. It is hard to keep a comprehensive track, analyze or avoid common memory errors such as memory leaks. This paper defines 12 types of memory fault patterns for real-time softwares, and proposes a novel approach to rapid analysis of memory errors for real-time softwares, based on C++code instrumentation. Information of pointer variables are obtained by C++ code static analysis. With running under various test cases, information including pointer allocation, release, assignment, c-use and p-use codes is collected in real-time. After memory fault analysis, a detailed report can be generated automatically. A case study shows that the proposed approach can find potential memory errors effectively, and make efficient improvements to software quality.
出处
《计算机科学与探索》
CSCD
2014年第6期704-711,共8页
Journal of Frontiers of Computer Science and Technology
基金
国家自然科学基金No.60970022~~
关键词
实时软件
内存错误
内存泄漏
代码插装
real-time software
memory error
memory leak
code instrumentation