Raisin: Identifying Rare Sensitive Functions for Bug Detection
Open Access
- 12 April 2024
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 1-12
Abstract
Mastering the knowledge about the bug-prone functions (i.e., sensitive functions) is important to detect bugs. Some automated techniques have been proposed to identify the sensitive functions in large software systems, based on machine learning or natural language processing. However, the existing statistics-based techniques are not directly applicable to a special kind of sensitive functions, i.e., the rare sensitive functions, which have very few invocations even in large systems. Unfortunately, the rare ones can also introduce bugs. Therefore, how to effectively identify such functions is a problem deserving attention. This study is the first to explore the identification of rare sensitive functions. We propose a context-based analogical reasoning technique to automatically infer rare sensitive functions. A 1+context scheme is devised, where a function and its context are embedded into a pair of vectors, enabling pair-wise analogical reasoning. Considering that the rarity of the functions may lead to low-quality embedding vectors, we propose a weighted subword embedding method that can highlight the semantics of the key subwords to facilitate effective embedding. In addition, frequent sensitive functions are utilized to filter out reasoning candidates. We implement a prototype called Raisin and apply it to identify the rare sensitive functions and detect bugs in large open-source code bases. We successfully discover thousands of previously unknown rare sensitive functions and detect 21 bugs confirmed by the developers. Some of the rare sensitive functions cause bugs even with a solitary invocation in the kernel. It is demonstrated that identifying them is necessary to enhance software reliability.Keywords
Funding Information
- National Natural Science Foundation of China (62272465, 62002361, U1836209)
- Fundamental Research Funds for the Central Universities and Research Funds of Renmin University of China (22XNKJ29)
- CCF-Huawei Populus euphratica Innovation Research Funding
This publication has 33 references indexed in Scilit:
- Automatically Identifying Security Checks for Detecting Kernel Semantic Bugs2019
- Precise and Scalable Detection of Double-Fetch Bugs in OS Kernels2018
- Hector: Detecting Resource-Release Omission Faults in error-handling code for systems software2013
- Iterative mining of resource-releasing specifications2011
- Alattin: Mining Alternative Patterns for Detecting Neglected Conditions2009
- Finding what's not there2007
- Mining Security-Sensitive Operations in Legacy Code Using Concept Analysis2007
- PR-Miner2005
- DynaMine2005
- Mining Temporal Specifications for Error Detection2005