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

A detection method and device for legitimate memory access

A memory access and detection method technology, applied in the field of computer programs, can solve the problems of low detection performance and low performance of instrumentation memory detection tools, and achieve the effect of improving detection efficiency and software performance

Inactive Publication Date: 2016-03-02
ZTE CORP
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] As mentioned above, in view of the low detection performance of instrumented memory detection tools and the fact that most of the memory accesses of general software are legal accesses, the main purpose of the present invention is to provide a detection method for legal memory accesses. It aims to effectively solve the technical problem that the existing memory access legality detection technology needs to check the legality through the instrumentation memory detection tool every time the memory is accessed, resulting in low performance

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
  • A detection method and device for legitimate memory access
  • A detection method and device for legitimate memory access
  • A detection method and device for legitimate memory access

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0044] It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

[0045] The present invention provides a detection method for legal memory access, referring to figure 1 , in an embodiment of the present invention, the legal memory access detection method at least includes the following steps:

[0046] S10, establish and initialize the cache; for example, according to the statistical data of general software memory usage, a 7-level cache can be established, each level of cache has 65536 units, and the corresponding sizes are 1~8, 9~128, 129~1K, 1k respectively Above ~ 8K, above 8k ~ 64K, above 64k ~ 1M and memory blocks above 1M bytes.

[0047] S20, calculate the total location index of the cache according to the size and address of the memory block to be detected; calculate the hierarchical cache index according to the memory information; for example, firstly, the cache level can ...

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 provides a detection method for legitimate memory access. The method comprises the steps of establishing a cache and performing initialization; calculating a cache total position index according to the size and the address of a to-be-detected memory block; when a program accesses a memory, addressing a hierarchical cache unit according to the cache total position index and judging whether the address information of the memory block can be read from the hierarchical cache unit; if the address information of the memory block can be read from the hierarchical cache unit, judging whether the access of this time requires detection by a pile inserting type memory detection tool according to the range of the memory access of this time; if the address information of the memory block cannot be read from the hierarchical cache unit, judging whether the access of this time is legitimate with the pile inserting type memory detection tool and putting the address information of the memory block into the hierarchical cache unit when it is determined that the access is legitimate. The invention also provides a device for implementing the method. The method and the device can effectively improve the memory access legitimacy detection efficiency and software performance.

Description

technical field [0001] The invention relates to the field of computer programs, in particular to a detection method and device for legal memory access. Background technique [0002] Illegal access to memory, including array overflow and out-of-bounds, illegal pointer operation, release of address information of wrong memory blocks, etc., has always been one of the most prone, harmful and difficult problems in the software development process. [0003] At present, there are mainly two kinds of C / C++ memory access legality detection tools: instrumentation memory detection tools and dynamic binary analysis tools. [0004] The specific method of the instrumented memory detection tool is to insert monitoring function stubs at memory allocation and access points when compiling C / C++ source files, and use the address information of the accessed memory block and the current access range to identify whether the access is legal. [0005] When detecting the memory access of large-scal...

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): G06F12/08
CPCG06F12/0802G06F12/1441G06F2212/1016G06F3/0604G06F3/0622G06F3/0632G06F3/0637G06F3/0673G06F12/1458G06F2212/1052
Inventor 汪世龙
Owner ZTE CORP
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