Embedded software stack overflow detection method and device
An embedded software and stack overflow technology, applied in software testing/debugging, error detection/correction, instrumentation, etc., can solve problems such as violating the use process, ignoring consumption, and not reflecting stack usage
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0056] This embodiment provides an embedded software stack overflow detection method, such as figure 1 shown, including the following steps:
[0057] Step 1: dividing the random access memory space of the processor into a stack area, a stack overflow buffer and a global variable area through a link file; and defining a stack overflow buffer array in the stack overflow buffer;
[0058] Step 2: Power on the processor and start the timer;
[0059] Step 3: In the interrupt service routine of the timer, read the data in the stack overflow buffer and the stack area, and calculate the maximum stack usage;
[0060] Step 4: Judging whether the maximum stack usage is greater than the size of the stack area, if so, judging as stack overflow, and proceeding to the next step; if not, returning to step 3;
[0061] Step 5: storing the overflowed context information into the stack overflow buffer array;
[0062] Step 6: Judging whether the maximum stack usage is less than or equal to a pre...
Embodiment 2
[0092] The purpose of this embodiment is to provide a computer device.
[0093] Based on the above purpose, the present embodiment provides a computer device, which is used for embedded software stack overflow detection, including a random access memory, a processor, and a computer program stored on the random access memory and operable on the processor, the processor The following steps are carried out when performing said procedure, comprising:
[0094] receiving the user's space division of the random memory of the processor, the space division divides the random memory into a stack area, a stack overflow buffer and a global variable area, and receives a stack overflow buffer array set on the stack overflow buffer;
[0095] Receive the power-on command and start the timer;
[0096] In the interrupt service program of the timer, read the data of the stack overflow buffer and the stack area, and calculate the maximum stack usage;
[0097] Judging whether the maximum stack u...
Embodiment 3
[0101] The purpose of this embodiment is to provide a computer-readable storage medium.
[0102] Based on the above purpose, the present embodiment provides a computer-readable storage medium, on which a computer program for stack overflow detection of embedded software is stored, and the program is executed by a processor to implement the following steps:
[0103] receiving the user's space division of the random memory of the processor, the space division divides the random memory into a stack area, a stack overflow buffer and a global variable area, and receives a stack overflow buffer array set on the stack overflow buffer;
[0104] Receive the power-on command and start the timer;
[0105] In the interrupt service program of the timer, read the data of the stack overflow buffer and the stack area, and calculate the maximum stack usage;
[0106] Judging whether the maximum stack usage is greater than the size of the stack area, if so, judging that the stack overflows, and p...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More - R&D
- Intellectual Property
- Life Sciences
- Materials
- Tech Scout
- Unparalleled Data Quality
- Higher Quality Content
- 60% Fewer Hallucinations
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2025 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com


