欢迎来到天天文库
浏览记录
ID:53030034
大小:905.90 KB
页数:9页
时间:2020-04-14
《基于中间语言的 JNI内存泄漏检查-论文.pdf》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、计算机研究与发展DOI:10.7544ssn10OO~1239.2015.20131909JournalofComputerResearchandDevelopment52(4):898—906,2015基于中间语言的JNI内存泄漏检查蒋挺宇王鹏杨述褥震董渊王生原嵇智源(清华大学计算机科学与技术系北京100084)(科技部高技术研究发展中心北京100044)(Jiangty08@gmail.com)DetectionofJNIMemoryLeaksBasedonExtendedBytecodeJiangTingyu,WangPeng,
2、YangShu,RuZhen,DongYuan,WangShengyuan。andJiZhiyuan(DepartmentofComputerScienceandTechnology,TsinghuaUniversity,Beijing100084)。(HighTechnologyResearchandDevelopmentCenter,MinistryofScienceandTechnology。Beijing100044)AbstractTheJavanativeinterface(JNI)enablesJavacoderunni
3、nginaJavavirtualmachine(JVM)tobecalledbynativecode,butthedifferenceofsecurityfeaturesbetweenlanguagesmakesitasecurityweakness,whichcannotbedetectedbyexistinganalysismethods.Commonlyuseddetectionmethodsaremainlybasedontheanalysisofintermediatelanguage,whichisinvalidinthi
4、sJNIcase,sincethelackofanintermediaterepresentationtobridgeJavaandC++.ThispaperanalyzesJNIfromaJava/C++cross—languageperspectiveandfocusesonmemoryleakswhichfrequentlyoccurinJNIcalls.Inordertoovercomelanguagebarriers,thispaperproposesextendedBytecode(Bytecode)instruction
5、sasinterpretationofC++semantics.Ourcontributionsaredescribedasfollows:1)DefineablockmemorymodelwhichiscompatiblewithbothJavaandC++;2)DesigntranslationrulesfromC++toextendedJavaBytecodebasedonLLVM/LLJVM;3)Constructamethodcallgraph,extractabstractanddetectmemory1eaksinJNI
6、callsbyinterproceduralanalysis.ExperimentsontypicalJNIcodewithmemoryleakfeaturesshowthatouranalysisworkcandetectmemoryleaksinJava/C++accurately,andisofimportantsignificanceincross—linguisticprogrammingandvulnerabilityanalysis.KeywordsJavanativeinterface(JNI);cross—lingu
7、isticanalysis;semanticextension;Bytecode;memoryleak摘要JNI技术支持Java与本地c/c++的相互调用,在Android等混合语言实现的系统中有着广泛应用,但语言之间的安全特性差异使其成为安全薄弱环节,现有的分析方法难以处理多语言相互调用产生的安全缺陷.以JNI调用中易产生的内存泄漏为例,开展Java/C++JNI跨语言分析的研究.采用扩展的JavaBytecode(Bytecode)指令作为C++语义的解释来消除跨语言分析的障碍.围绕JNI调用中内存泄漏的问题,做了以下3方面工作:
8、1)定义兼容Java/C++语言的分块内存模型;2)基于LLVM/LLJVM,设计实现了C++到Bytecode的翻译策略;3)建立方法调用图,提取方法摘要,利用过程间分析方法检测JNI调用中的内存泄漏.针对具有典型内存
此文档下载收益归作者所有