Eureka AIR delivers breakthrough ideas for toughest innovation challenges, trusted by R&D personnel around the world.

The Static function call graph construction method suitable for virtual function and function pointermethod is suitable for constructing static function call graph of virtual function and function pointer

A function call graph and function pointer technology, which is used in electrical digital data processing, inter-program communication, instruments, etc., can solve the problem that the function pointer calling relationship cannot be accurately analyzed, the static detection accuracy is not high, and the thread function context information is lost. and other problems, to achieve the effect of accurate analysis results

Active Publication Date: 2019-08-30
UNIV OF SCI & TECH OF CHINA
View PDF8 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] At present, many methods for constructing static function call graphs have emerged, but there are still many problems in the existing static analysis methods, mainly including: 1. At present, there is no static analysis method that can fully extract functions such as virtual functions and function pointers call relationship
2. Existing methods cannot accurately analyze the function pointer call relationship
3. For programs that use multi-threaded programming, there is currently no way to statically extract the parent-child relationship between threads. The context information of thread functions is all lost in static analysis, which leads to deadlocks, data competition, false sharing, etc. in multi-threaded programming. The static detection accuracy of the problem is not high

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • The Static function call graph construction method suitable for virtual function and function pointermethod is suitable for constructing static function call graph of virtual function and function pointer
  • The Static function call graph construction method suitable for virtual function and function pointermethod is suitable for constructing static function call graph of virtual function and function pointer
  • The Static function call graph construction method suitable for virtual function and function pointermethod is suitable for constructing static function call graph of virtual function and function pointer

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0053] In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, the following will describe in detail with reference to the drawings and specific embodiments.

[0054] Such as figure 1 As shown, the present invention relates to a method for constructing a static function call graph applicable to virtual functions and function pointers, and according to the method, a tool SExecCG (call graph based on simulation execution, referred to as SExecCG) for constructing a static call graph is realized, which belongs to The field of software engineering also belongs to the field of program static analysis.

[0055] Step 1. Obtain the intermediate code of the source program

[0056] The embodiment of the present invention implements the method of the present invention under the framework of the LLVM compiler, uses the Clang / Clang++ compiler under the framework of the compiler, and appropriately modifies the source code of...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a static function call graph construction method suitable for a virtual function and a function pointer. The static function call graph construction method comprises the following steps: 1, obtaining an intermediate code of a source program; 2, obtaining key information in the intermediate code, wherein the key information comprises a basic block sequence queue and virtualfunction related information; 3, performing simulation execution on the intermediate code based on the key information, analyzing an actual function called by a function calling instruction in the intermediate code, and recording a function calling relation; and 4, constructing a static function call graph according to the function call relationship. According to the method, the virtual function,the function pointer calling and the thread creation relationship can be comprehensively analyzed, and the complex function pointer calling can be accurately analyzed, so that program developers can be better helped to understand programs, and meanwhile, the accuracy of a static analysis method depending on a function calling graph is improved.

Description

technical field [0001] The invention relates to the technical field of computer software, in particular to a method for constructing a static function call graph suitable for virtual functions and function pointers. Background technique [0002] As the size and complexity of modern software systems continue to increase, function call graphs are receiving increasing attention. On the one hand, the function call graph can help software developers analyze the code structure and clarify the code logic. On the other hand, function call graphs are widely used in the field of program static analysis. For example, function call graphs can be used to detect and eliminate dead code in programs. The function call graph can also be combined with the control flow graph to form an inter-process control flow graph, which is the basis of flow-sensitive algorithms such as vulnerability detection and security analysis in program static analysis. A complete and accurate function call graph ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F9/54
CPCG06F9/546G06F9/547
Inventor 顾乃杰张帆苏俊杰
Owner UNIV OF SCI & TECH OF CHINA
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Eureka Blog
Learn More
PatSnap group products