• 中国精品科技期刊
  • CCF推荐A类中文期刊
  • 计算领域高质量科技期刊T1类
Advanced Search
Jiang Tingyu, Wang Peng, Yang Shu, Ru Zhen, Dong Yuan, Wang Shengyuan, Ji Zhiyuan. Detection of JNI Memory Leaks Based on Extended Bytecode[J]. Journal of Computer Research and Development, 2015, 52(4): 898-906. DOI: 10.7544/issn1000-1239.2015.20131909
Citation: Jiang Tingyu, Wang Peng, Yang Shu, Ru Zhen, Dong Yuan, Wang Shengyuan, Ji Zhiyuan. Detection of JNI Memory Leaks Based on Extended Bytecode[J]. Journal of Computer Research and Development, 2015, 52(4): 898-906. DOI: 10.7544/issn1000-1239.2015.20131909

Detection of JNI Memory Leaks Based on Extended Bytecode

More Information
  • Published Date: March 31, 2015
  • The Java native interface(JNI)enables Java code running in a Java virtual machine(JVM) to be called by native code, but the difference of security features between languages makes it a security weakness, which cannot be detected by existing analysis methods. Commonly used detection methods are mainly based on the analysis of intermediate language, which is invalid in this JNI case, since the lack of an intermediate representation to bridge Java and C++. This paper analyzes JNI from a Java/C++ cross-language perspective and focuses on memory leaks which frequently occur in JNI calls. In order to overcome language barriers, this paper proposes extended Bytecode (Bytecode*) instructions as interpretation of C++ semantics. Our contributions are described as follows: 1)Define a block memory model which is compatible with both Java and C++;2) Design translation rules from C++ to extended Java Bytecode based on LLVM/LLJVM;3)Construct a method call graph, extract abstract and detect memory leaks in JNI calls by interprocedural analysis. Experiments on typical JNI code with memory leak features show that our analysis work can detect memory leaks in Java/C++ accurately, and is of important significance in cross-linguistic programming and vulnerability analysis.
  • Related Articles

    [1]Jiang Tianyang, Zhang Guangyan, Li Zhiyue. Survey on Concurrency Control Protocols of In-Memory Transactions[J]. Journal of Computer Research and Development, 2022, 59(4): 721-736. DOI: 10.7544/issn1000-1239.20210231
    [2]Yang Fan, Li Fei, Shu Jiwu. Survey on Secure Persistent Memory Storage[J]. Journal of Computer Research and Development, 2020, 57(5): 912-927. DOI: 10.7544/issn1000-1239.2020.20190820
    [3]Chen Juan, Hu Qingda, Chen Youmin, Lu Youyou, Shu Jiwu, Yang Xiaohui. A Tiny-Log Based Persistent Transactional Memory System[J]. Journal of Computer Research and Development, 2018, 55(9): 2029-2037. DOI: 10.7544/issn1000-1239.2018.20180294
    [4]Hillel Avni, Wang Peng. Persistent Transactional Memory for Databases[J]. Journal of Computer Research and Development, 2018, 55(2): 305-318. DOI: 10.7544/issn1000-1239.2018.20170863
    [5]Xu Yuanchao, Yan Junfeng, Wan Hu, Sun Fengyun, Zhang Weigong, Li Tao. A Survey on Security and Privacy of Emerging Non-Volatile Memory[J]. Journal of Computer Research and Development, 2016, 53(9): 1930-1942. DOI: 10.7544/issn1000-1239.2016.20150581
    [6]Fu Jianming, Liu Xiuwen, Tang Yi, Li Pengwei. Survey of Memory Address Leakage and Its Defense[J]. Journal of Computer Research and Development, 2016, 53(8): 1829-1849. DOI: 10.7544/issn1000-1239.2016.20150526
    [7]Jia Gangyong, Li Xi, Wan Jian, Wang Chao, Dai Dong. A Memory Partition Policy for Mitigating Contention[J]. Journal of Computer Research and Development, 2015, 52(11): 2599-2607. DOI: 10.7544/issn1000-1239.2015.20140706
    [8]Xiao Ruliang, Jiang Jun, Hu Yao, Han Jia, Ni Youcong, Du Xin, and Cai Shengzhen. An Approach to Runtime Memory Leak Detection Oriented to Xen Virtual Computing Environment[J]. Journal of Computer Research and Development, 2013, 50(11): 2406-2417.
    [9]He Yanxiang, Wu Wei, Chen Yong, Li Qing'an, Liu Jianbo. A Kind of Safe Typed Memory Model for C-Like Languages[J]. Journal of Computer Research and Development, 2012, 49(11): 2440-2449.
    [10]Dong Longming, Wang Ji, Chen Liqian, Dong Wei. Memory Leak Detection for Heap-Manipulating Programs Based on Local Heap Abstraction[J]. Journal of Computer Research and Development, 2012, 49(9): 1832-1842.

Catalog

    Article views (1774) PDF downloads (831) Cited by()

    /

    DownLoad:  Full-Size Img  PowerPoint
    Return
    Return