Task stack overflow monitoring method and system

A task stack and task detection technology, applied in the computer field, can solve problems such as abnormal function, missed task stack overflow, and inability to monitor task stack overflow in real time, so as to facilitate finding problems and prevent damage.

Pending Publication Date: 2017-12-19
HANGZHOU DPTECH TECH
View PDF3 Cites 12 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The disadvantage of the existing technical solution is: in the memory space occupied by each function, not every byte can be read and written, and a considerable part of the memory content is reserved, and no read and write operations will occur; even if it is used for The space for storing local variables may not necessarily be written due to different function parameters or external conditions
When other tasks access the memory that has been written into wrong data again, the function will be abnormal, and the phenomenon of task stack overflow cannot be monitored in real time, and the phenomenon of task stack overflow will be missed.

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
  • Task stack overflow monitoring method and system
  • Task stack overflow monitoring method and system
  • Task stack overflow monitoring method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0024] First, a method for monitoring task stack overflow provided by an embodiment of the present invention is described, and the method may include the following steps:

[0025] Detect the operation status of the function stack in the task;

[0026] If the function stack operation state is a preset function stack operation, then read the bottom address of the task stack;

[0027] comparing the difference between the current stack top address and the bottom address of the task stack minus the total length of the task stack;

[0028] Monitor task stack overflow based on comparison results.

[0029] Wherein, the operation state of the function stack in the task is that the function performs a stack push operation or performs a stack unstack operation during execution. Here is an explanation of the function’s stack push operation and stack unstack operation: when each function is called, a memory area allocated in the task stack space becomes the stack frame of the function. ...

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 task stack overflow monitoring method, which comprises the following steps that: detecting the operation state of a function stack in a task; if the operation state of the function stack is a preset function stack operation, reading the stack bottom address of the task stack; comparing a difference value obtained in a way that the total length of the task stack is subtracted from a current stack top address and the stack bottom address of the task stack; and according to a comparison result, monitoring task stack overflow. Compared with the prior art, the scheme disclosed by the invention does not occupy additional memory space used for setting a read-only memory area, and a task stack overflow phenomenon is monitored in real time and does not fail to be reported.

Description

technical field [0001] The present application relates to the field of computers, in particular to a method and system for monitoring task stack overflow. Background technique [0002] In the operating system, such as the Linux operating system, in order to improve the operating efficiency of the operating system, all tasks will share the same physical address space, only the memory space occupied by the task stack is independent, and there is no memory address protection mechanism between any tasks. The total length of a task stack is limited. If it is too long, memory space will be wasted. If it is too short, it may cause task stack overflow (task stack overflow is also called stack top crossing). Task stack overflow means that memory contents used for other functions will be read and written during task execution. The memory content of other functions may be the memory content used by this task, or the memory content used by other tasks, resulting in various abnormal phe...

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/30G06F11/36G06F11/07
CPCG06F11/073G06F11/3037G06F11/3051G06F11/366
Inventor 符志清李艳华
Owner HANGZHOU DPTECH TECH
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
Try Eureka
PatSnap group products