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

Method for supervising running stack and static data area overlapping

A static data and data technology, applied in software testing/debugging, program control devices, software simulation/interpretation/simulation, etc., can solve problems such as unsupported, poor usability, and instructions occupying instruction memory

Active Publication Date: 2007-02-28
G CLOUD TECH
View PDF0 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Although this method is much more accurate than the previous method, it still has relatively large disadvantages: first, it requires testers to make comparisons, and also requires testers to know the size of the static data area, so this method is not easy to use ; Disadvantage 2, adding instructions needs to occupy instruction memory, which is not suitable for programs with high pressure on instruction memory; Supported in , the executable file generated at this time cannot run in the actual hardware environment

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
  • Method for supervising running stack and static data area overlapping
  • Method for supervising running stack and static data area overlapping
  • Method for supervising running stack and static data area overlapping

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0023] Below in conjunction with accompanying drawing and specific embodiment the present invention is described in further detail:

[0024] The present invention is based on the following two basic principles: one is to ensure that the program semantics remain unchanged before and after adjustment;

[0025] A method for detecting overlap between a running stack and a static data area, comprising the following specific steps:

[0026] 1. After the linker calculates the size of each area in the static data area, assign a new loading address for each area and calculate a new initial value of the stack pointer; this step also includes the following sub-steps:

[0027] Step 1.1: Obtain the original loading address and size of each area to be adjusted;

[0028] Step 1.2: Starting from the highest address in the data memory space, assign a new load address to each region from high to low.

[0029] Step 1.3: Calculate the amount of change in the load address of each region.

[003...

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 relates to a method for checking the superposition between operation stack and static data area, wherein in linkage device, it adjusts the distribution of operation stack and static data area in data memory, then detects it in software simulator when operating, adds the relation code between judgment stack point value and minimum address size of data memory in the software simulator; if the stack point value is lower than the minimum address, there is descending overflow of operation stack, and there is superposition error between them. The invention has the advantages that: (1), the simulator only needs to add the relation code between judgment stack point value and base address size of data memory, to automatically information mistake when there is descending overflow in operation stack; (2), it can avoid memory consumption; (3), the generated executable document can be loaded on hardware.

Description

technical field [0001] The invention relates to the detection of program runtime errors in an embedded system, in particular to a method for detecting the overlapping of a running stack and a static data area. Background technique [0002] Due to price and application reasons, the instruction memory and data memory in the embedded system are relatively small, so when the program is executed, there may be overlapping of different types of data (such as static data area, heap, and running stack) in the data memory. Condition. The static data section (static data sections) includes each data section in the ELF executable file. The loading addresses of these data areas are usually specified in linker scripts. In a simple embedded system, the running program only loads the instruction and data parts in the ELF executable file, and discards the Section Header Table (Section Header Table) that stores the size information of each section in the ELF file. However, most of such sim...

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/36G06F9/455
Inventor 谷晓铭霍玮桂剑贾耀仓张兆庆冯晓兵
Owner G CLOUD TECH
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