Check patentability & draft patents in minutes with Patsnap Eureka AI!

Heterogeneous platform-oriented multi-level storage structure memory detection method

A storage structure and memory detection technology, applied in the field of compilation optimization, can solve problems such as difficult to find and locate, affect software security, and exploit by hackers

Active Publication Date: 2021-04-09
JIANGNAN INST OF COMPUTING TECH
View PDF2 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Heterogeneous many-core processor programming is more complicated. In C and C++ heterogeneous code, all memory operations must be handled by the programmer. The programmer must not only consider the storage structure but also need to manage memory usage at each level. Therefore, if processing Not good, memory problems will occur, and it will be difficult to find and locate
If you allocate a heap object but forget to release it, a memory leak will occur; and if the object has been released, but the corresponding pointer is not set to NULL, the pointer is a so-called "dangling pointer". When using this pointer again, There will be illegal access, which will cause the program to crash in serious cases; incorrect memory usage will also cause memory overflow, which will cause the program to run incorrectly or be used by hackers
Once these problems occur, it is fatal for programmers, because the code is extremely complicated and it is difficult to accurately locate the specific error site
[0004] At present, memory error detection combined with compilation technology mostly focuses on static detection, but the false negative rate of static detection is low but the false positive rate is high, and dynamic detection cannot support multi-level storage space
Static memory detection of general-purpose processors simply performs lexical analysis and syntax analysis on the source code to complete the error detection function through simple judgments. The types of errors are not comprehensive, and a large number of detection tools can only detect certain types of memory errors. For other types of errors However, these errors are likely to be an important part of software security
The dynamic detection mechanism of general-purpose processors works well, but because dynamic detection is closely related to the architecture, it cannot effectively support complex multi-level storage structures in terms of memory division, shadow area mapping, and functional area division. It is not suitable for applications with multiple instruction sets. , on heterogeneous many-core processors with multi-level storage structure

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
  • Heterogeneous platform-oriented multi-level storage structure memory detection method
  • Heterogeneous platform-oriented multi-level storage structure memory detection method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0031] Embodiment: a kind of heterogeneous platform-oriented multi-level storage structure memory detection method, based on the compiler and runtime library of heterogeneous many-core processor, based on the compiler and runtime library of heterogeneous many-core processor, comprising the following step:

[0032] S1. Implement a custom dynamic runtime library and provide interface functions. The master core and slave core can call the custom dynamic runtime library through the interface function, and realize memory detection and related work in the custom dynamic runtime library. The specific process as follows:

[0033] S11. In the process of memory mapping, a shadow memory is established. The relationship between the shadow memory and the main memory is: N=ChooseBlock; shadow=>>3)+shadowbeg[N], that is, there is a relationship between the shadow memory and the main memory One-to-one mapping relationship;

[0034]S12. Based on the multi-level storage structure, the custom ...

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 heterogeneous platform-oriented multi-level storage structure memory detection method, a compiler based on a heterogeneous many-core processor and a runtime library. The method comprises the following steps that S1, a user-defined dynamic runtime library is realized; S2, in the self-defined dynamic runtime library, when the section where the slave core program occurs is an example exception or a termination exception, the slave core sends an exception interrupt signal to the master core, and the master core agents the slave core to perform exception processing; S3, the master core and the slave core respectively compile and analyze the source program, process the source program into an intermediate code, and perform instrumentation processing on a position needing instrumentation on the intermediate code; S4, the compiler compiles, assembles and links the intermediate codes processed in the S3 to generate executable codes, and then generates and runs an executable file. According to the method, dynamic detection of the memory errors is realized on the heterogeneous many-core processor with a multi-instruction set and a multi-level storage structure, the types of the detected errors are multiple, the description of error information is detailed, the positioning is accurate, and the detection effect is better.

Description

technical field [0001] The invention relates to a heterogeneous platform-oriented multi-level storage structure memory detection method, which belongs to the technical field of compilation optimization. Background technique [0002] Memory errors are one of the common programming problems for C and C++ programmers. Memory errors will not only cause errors in running results and crashes of running programs, but may even be maliciously used by hackers. Memory error detection can improve program correctness, stability, and security. [0003] Compilers for general-purpose chips divide memory into three logical areas: the heap, stack, and static storage. The domestic heterogeneous many-core processor has a multi-level storage structure, which is divided into data sharing area, code read-only area, dynamic space area, etc. In the same memory space, the space addressing of different functional areas is not continuous, and the addressing space range Large, with multiple heaps, st...

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): G06F11/36
CPCG06F11/366
Inventor 武文浩沈莉王飞肖谦管茂林周文浩
Owner JIANGNAN INST OF COMPUTING TECH
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More