资源描述:
《(精品)基于指针映射集的动态内存故障测试方法研究》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、个人收集整理仅供参考学习基于指针映射集的动态内存故障测试方法研究张威1),2),宫云战2),卢庆龄1),万琳1)1)(装甲兵工程学院信息工程系北京100072)2)(北京邮电大学网络与交换技术国家重点实验室北京100876)摘要动态内存故障在使用指针的程序中是普遍存在的,采用动态测试方法进行测试难以准确定位故障源.而现有的静态分析方法主要存在漏报和误报过多的情况.针对这些问题,提出了指针映射代数系统的概念,全面地反映了指针与内存之间的映射关系.并给出了面向不同故障的指针映射集的构造规则,以此为基础建立了动态内存故障模型
2、.通过指针映射集和故障模型,可以自动检测内存释放异常、内存泄露和空指针引用等动态内存故障,提高了测试效率.在分析过程中,还综合应用了控制流图和路径条件,提高了测试结果的精度.实验结果表明,该方法能够有效检测动态内存故障,而且由于规则定义较为全面,漏报和误报率也较低.资料个人收集整理,勿做商业用途关键词软件测试;静态分析;指针映射集;内存泄漏;空指针引用中图分类号TP302.8ResearchonDynamicMemoryFaultsTestingMethodbasedonPointerMappingSets资料个人收集
3、整理,勿做商业用途ZHANGWei1),2),GONGYun-Zhan2),LUQing-Ling1),WANLin1)资料个人收集整理,勿做商业用途1)(DepartmentofInformationEngineering,AcademyofArmoredForceEngineering,Beijing100072)资料个人收集整理,勿做商业用途2)(StateKeyLaboratoryofNetworkingandSwitchingTechnology,BeijingUniversityofPostsandTele
4、communications,Beijing100876)资料个人收集整理,勿做商业用途Abstract:Dynamicmemoryfaultsareubiquitousintheprogramwithpointers.Itisdifficulttolocatefaultssourcesadoptingdynamictestingmethod.Staticanalysismethodsnowadaysoftenmisssomefaultsandproducetoomanyfalsealarms.Consideringo
5、ftheseproblems,thispaperputsforwardthenotionofpointermappingalgebrasystemthatreflectsthemappingrelationshipofpointerandmemorycompletely,andgivestheconstructionrulesofpointermappingsetsfordifferentfaultsclass,andthenestablishesdynamicmemoryfaultsmodel.Throughpoin
6、termappingsetsandfaultmodel,itcandetectbaddeallocation,memoryleakandnullpointerdereferencefaultsautomaticallyandincreasethetestingefficiency.Intheprocessofanalyzing,itadoptssyntheticallycontrolflowchartandpathconditioninordertoincreasetheprecisionoftestingresult
7、s.Resultsofexperimentationshowthatthismethodcandetectdynamicmemoryfaultseffectively.Sinceruledefinitionisgeneral,theprobabilityofmissingfaultsandproducingfalsealarmsislower.资料个人收集整理,勿做商业用途Keywords:softwaretesting;staticanalysis;pointermappingsets;memoryleak;null
8、pointerdereference资料个人收集整理,勿做商业用途9/9个人收集整理仅供参考学习1引言随着信息技术的发展,软件的规模不断扩大,如何保证和提高软件质量成为软件界最为关心的问题之一.软件测试作为保证软件质量的关键技术之一,能够有效地发现软件中的故障.根据Boehm的统计,在软件开发总成本中,用在测试上的开销要占30%到