Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Memory access abnormity detecting method and memory access abnormity detecting device

A technology of memory access and detection methods, applied in the field of compilation, can solve the problem of inability to detect memory access exceptions efficiently, cannot handle stack overflow, and affect program execution performance.

Active Publication Date: 2015-05-20
AGRICULTURAL BANK OF CHINA
View PDF5 Cites 35 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, when the program is running, it needs to search the first and last glyphs every time the memory is accessed, and judge whether it is out of bounds, which will seriously affect the execution performance of the program. In addition, the existing technology cannot handle the stack overflow scenario
[0005] It can be seen that the existing technology cannot accurately and efficiently detect the problem of abnormal memory access

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
  • Memory access abnormity detecting method and memory access abnormity detecting device
  • Memory access abnormity detecting method and memory access abnormity detecting device
  • Memory access abnormity detecting method and memory access abnormity detecting device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0060] Explanation of related terms:

[0061] Dynamic detection: For the dynamic detection method of memory access exception, dynamic detection code or assertion needs to be inserted into the program, and the buffer overflow vulnerability can be found in time during the execution of the program;

[0062] A control flow graph (CFG) is an abstract data structure used in compilers. It is an abstract representation of a procedure or program, maintained internally by the compiler. Each node in the control flow graph represents a basic block, ie, a basic block without any jumps or jump targets; jump targets start with a block, and end with a block. Each directed edge in the control flow graph is used to represent the jump direction in the control flow, or the jump relationship between basic blocks. Function call graph (Func Call Graph, FCG): The nodes in the CFG above usually refer to the basic blocks where branches occur, and the nodes in the FCG are independent functions;

[00...

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 memory access abnormity detecting method and a memory access abnormity detecting device. The memory access abnormity detecting method comprises the following steps of checking source codes and analyzing the morphology, the grammar and the semanteme of the source codes to generate a control flow diagram, a data dependence diagram, a first list file and a second list file; establishing a global function invocation diagram of the source codes according to the control flow diagram; performing matching detection on dynamic memory allocation of the source codes according to the global function invocation diagram, the second list file and the data dependence diagram; and establishing a virtual executing platform; and extracting an executing path according to the first list file, the control flow diagram and the data dependence diagram so as to detect memory leakage caused by dynamic memory allocation and memory access violation during running of a program. Memory access abnormity in the source codes can be sufficiently dug by analyzing the first list file, the second list file, the control flow diagram, the data dependence diagram and the global function invocation diagram, establishing the virtual executing platform and extracting the executing path, and the memory access abnormity can be detected efficiently.

Description

technical field [0001] The present application relates to the field of compiling technology, in particular to a method and device for detecting memory access exceptions. Background technique [0002] Memory access exceptions usually manifest as memory leaks caused by dynamic memory allocation, and memory access out-of-bounds when the program is running. Specifically, a memory leak means that the program uses functions such as malloc to dynamically apply for memory space from the operating system at runtime. Because the program temporarily exits or the programmer does not call the free function in the source code to release it, the process occupies memory resources for a long time. Out-of-bounds memory access refers to out-of-bounds access due to abnormal program calculations, irregular code writing, or illegal tampering of memory. These problems may lead to difficult-to-predict results during the running of the program. Therefore, how to detect and judge possible loopholes ...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36G06F21/52
Inventor 朱浩王淑静刘国兴曹新平
Owner AGRICULTURAL BANK OF CHINA
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products