CN109885402B - Method for testing function output data overflow, terminal equipment and storage medium - Google Patents

Method for testing function output data overflow, terminal equipment and storage medium Download PDF

Info

Publication number
CN109885402B
CN109885402B CN201910080047.6A CN201910080047A CN109885402B CN 109885402 B CN109885402 B CN 109885402B CN 201910080047 A CN201910080047 A CN 201910080047A CN 109885402 B CN109885402 B CN 109885402B
Authority
CN
China
Prior art keywords
comparison
data
memory space
overflow
output data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910080047.6A
Other languages
Chinese (zh)
Other versions
CN109885402A (en
Inventor
董时舫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
PAX Computer Technology Shenzhen Co Ltd
Original Assignee
PAX Computer Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by PAX Computer Technology Shenzhen Co Ltd filed Critical PAX Computer Technology Shenzhen Co Ltd
Priority to CN201910080047.6A priority Critical patent/CN109885402B/en
Publication of CN109885402A publication Critical patent/CN109885402A/en
Application granted granted Critical
Publication of CN109885402B publication Critical patent/CN109885402B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention is suitable for the technical field of program test, and provides a method for testing function output data overflow, a terminal device and a storage medium, wherein the method comprises the following steps: randomly generating first comparison data and second comparison data; writing the first comparison data into a preset first comparison memory space, and writing the second comparison data into a preset second comparison memory space; calling and executing a target function; reading the first test data and the second test data; and when the first test data is not the same as the first comparison data and/or the second test data is not the same as the second comparison data, determining that the target function has output data overflow. The method for testing the overflow of the function output data, the terminal device and the storage medium provided by the embodiment of the invention can detect the memory overflow without obvious abnormal performance in real time, can dynamically detect the overflow of the function output, and solves the problem of low test reliability of the overflow test of the function output data in the prior art.

Description

Method for testing function output data overflow, terminal equipment and storage medium
Technical Field
The invention belongs to the technical field of program testing, and particularly relates to a method for testing function output data overflow, a terminal device and a storage medium.
Background
In the development process of various computer software, memory overflow is a problem which is easy to occur, and function output data overflow is one of the main forms of memory overflow. The most common manifestation of memory overflow is crash, including program trapping in dead loops, data violation abnormal crash, prefetch value abnormal crash, and so on. Memory overflow also has other manifestations, such as variables being occasionally or always overwritten, data being read being occasionally or always incorrect.
Conventional memory overflow testing is performed indirectly and passively by observing whether a system has an exception (e.g., a data access exception, an instruction fetch exception) after a function is called. Since the system sometimes has no obvious abnormal performance after the memory overflow occurs, the memory overflow test method is not reliable. Still another approach relies on memory overflow detection tools to scan and detect program source code. The method also has certain limitation, and the defect of memory overflow generated in the dynamic operation state is not easy to detect.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, a terminal device, and a storage medium for testing function output data overflow, so as to solve the problem in the prior art that a function output data overflow test has low test reliability.
According to a first aspect, an embodiment of the present invention provides a method for testing function output data overflow, including: randomly generating first comparison data and second comparison data; writing the first comparison data into a preset first comparison memory space, and writing the second comparison data into a preset second comparison memory space; the first comparison memory space and the second comparison memory space are respectively adjacent to a preset target memory space, and the target memory space is used for storing output data of a target function; calling and executing the target function; reading first test data in the first comparison memory space and second test data in the second comparison memory space; and when the first test data is different from the first comparison data and/or the second test data is different from the second comparison data, determining that the target function has output data overflow.
According to the method for testing the overflow of the function output data, provided by the embodiment of the invention, the overflow test of the target function output data is realized by detecting whether data tampering occurs in two comparison memory spaces adjacent to the target memory space of the output data after the target function is executed. Since function output data overflow usually occurs in the memory area adjacent to the output variable, detection and determination of the output data overflow can be realized by closely monitoring whether the memory areas adjacent to the front and back of the output variable are overwritten. The method for testing the overflow of the function output data provided by the embodiment of the invention can detect the overflow of the memory without obvious abnormal performance in real time, can dynamically detect the overflow of the function output data in the process of program operation, and solves the problem of low test reliability of the overflow test of the function output data in the prior art.
With reference to the first aspect, in a first implementation manner of the first aspect, the method for testing overflow of function output data further includes: when the first test data is the same as the first comparison data and the second test data is the same as the second comparison data, acquiring a test count; and when the test count reaches a preset count threshold value, determining that the target function has no output data overflow.
The method for testing the overflow of the function output data provided by the embodiment of the invention can realize multiple tests on the overflow of the function output data by counting the test counts. In the method for testing overflow of function output data provided in the embodiment of the present invention, although random numbers are respectively stored in the first comparison memory space and the second comparison memory space as the first comparison data and the second comparison data before the target function is called each time, there is a case that the content of overflow rewriting is exactly the same as the random number. Through a mode of testing for many times and replacing random numbers in each test, the probability of function output data overflow and missing test can be effectively reduced.
With reference to the first implementation manner of the first aspect, in a second implementation manner of the first aspect, the method for testing overflow of function output data further includes: when the test count does not reach a preset count threshold value, the random generation of the first comparison data and the second comparison data is repeatedly executed; writing the first comparison data into a preset first comparison memory space, and writing the second comparison data into a preset second comparison memory space; the first comparison memory space and the second comparison memory space are respectively adjacent to a preset target memory space, and the target memory space is used for storing output data of a target function; calling and executing the target function; reading first test data in the first comparison memory space and second test data in the second comparison memory space until the first test data is different from the first comparison data and/or the second test data is different from the second comparison data, and determining that the target function has output data overflow; or determining that the target function has no output data overflow until the test count reaches a preset count threshold.
According to the method for testing the overflow of the function output data, provided by the embodiment of the invention, when the test count does not reach the preset count threshold value, the overflow test of the output data of the target function is repeatedly carried out, so that the omission can be avoided, and the reliability of the overflow test is improved.
According to a second aspect, an embodiment of the present invention provides a method for testing overflow of multiple output data of a function, including: according to the first aspect or the method for testing overflow of function output data in any embodiment of the first aspect, overflow testing is performed on each output data of a target function respectively; and when any output data of the objective function has overflow, determining that the output data of the objective function has overflow.
According to the method for testing the overflow of the multiple output data of the function, provided by the embodiment of the invention, the target function is called for multiple times, and the overflow test is carried out on each output data of the target function one by one, so that the comprehensive overflow detection can be carried out on the target function, the memory overflow without obvious abnormal performance can be detected in real time, the overflow of the function output data can be dynamically detected in the program running process, and the problem of low test reliability in the overflow test of the function output data in the prior art is solved.
With reference to the second aspect, in a first implementation manner of the second aspect, the method for testing overflow of multiple output data of a function further includes: and when the overflow of each output data of the objective function does not exist, determining that the overflow of the output data does not exist in the objective function.
According to the method for testing the overflow of the multiple output data of the function, provided by the embodiment of the invention, the overflow test is respectively carried out on each output data of the target function, the output data is judged to pass through the target function of the overflow test without the overflow defect of the output data, and the function output overflow test containing multiple output variables can be reliably realized.
According to a third aspect, an embodiment of the present invention provides a method for testing overflow of multiple output data of a function in parallel, including: respectively randomly generating a pair of comparison data for each output data of the objective function; each pair of the comparison data comprises first comparison data and second comparison data; respectively writing the comparison data into corresponding comparison memory spaces; each comparison memory space comprises a first comparison memory space used for storing the first comparison data and a second comparison memory space used for storing the second comparison data; the first comparison memory space and the second comparison memory space are respectively adjacent to a memory space for storing the corresponding output data; calling and executing the target function; reading first test data in each first comparison memory space and second test data in each second comparison memory space; and when any first test data is different from the corresponding first comparison data and/or any second test data is different from the corresponding second comparison data, determining that the target function has output data overflow.
The method for testing overflow of a plurality of output data of a function in parallel provided by the embodiment of the invention only needs to call the target function once, and by detecting whether data tampering occurs in two comparison memory spaces adjacent to the target memory space of each output data after the target function is executed, overflow testing of the output data of the target function is realized. Since function output data overflow usually occurs in the memory area adjacent to the output variable, detection and determination of the output data overflow can be realized by closely monitoring whether the memory areas adjacent to the front and back of the output variable are overwritten. The method for testing overflow of a plurality of output data of a function in parallel provided by the embodiment of the invention can detect the overflow of the memory without obvious abnormal performance in real time, and can dynamically detect the overflow of the output data of the function in the process of program operation, thereby solving the problem of low test reliability of the overflow test of the output data of the function in the prior art.
With reference to the third aspect, in a first implementation manner of the third aspect, the method for testing overflow of multiple output data of a function in parallel further includes: when any one of the first test data is the same as the corresponding first comparison data and any one of the second test data is the same as the corresponding second comparison data, acquiring a test count; and when the test count reaches a preset count threshold value, determining that the target function has no output data overflow.
The method for testing the overflow of the multiple output data of the function in parallel provided by the embodiment of the invention can realize multiple tests on the overflow of the output data of the function by counting the test count. In the method for overflowing a plurality of output data of a parallel test function provided in the embodiment of the present invention, although in each overflow test, random numbers are respectively stored in the first comparison memory space and the second comparison memory space before the target function is called as the first comparison data and the second comparison data, the overflow rewriting content is exactly the same as the random numbers. Through a mode of testing for many times and replacing random numbers in each test, the probability of function output data overflow and missing test can be effectively reduced.
With reference to the first embodiment of the third aspect, in a second embodiment of the third aspect, the method for testing overflow of multiple output data of a function in parallel further includes: when the test count does not reach a preset count threshold value, repeatedly executing the output data respectively serving as the target function to randomly generate a pair of comparison data; each pair of the comparison data comprises first comparison data and second comparison data; respectively writing the comparison data into corresponding comparison memory spaces; each comparison memory space comprises a first comparison memory space used for storing the first comparison data and a second comparison memory space used for storing the second comparison data; the first comparison memory space and the second comparison memory space are respectively adjacent to a memory space for storing the corresponding output data; calling and executing the target function; reading first test data in each first comparison memory space and second test data in each second comparison memory space until output data overflow of the target function is determined when any first test data is different from the corresponding first comparison data and/or any second test data is different from the corresponding second comparison data; or determining that the target function has no output data overflow until the test count reaches a preset count threshold.
According to the method for testing the overflow of the multiple output data of the function in parallel, provided by the embodiment of the invention, when the test count does not reach the preset count threshold value, the overflow test of the output data of the target function is repeatedly carried out, so that the omission can be avoided, and the reliability of the overflow test is improved.
According to a fourth aspect, an embodiment of the present invention provides an apparatus for testing function output data overflow, including: a first comparison data generation unit for randomly generating first comparison data and second comparison data; the first comparison data is written into a preset first comparison memory space, and the second comparison data is written into a preset second comparison memory space; the first comparison memory space and the second comparison memory space are respectively adjacent to a preset target memory space, and the target memory space is used for storing output data of a target function; the first function execution unit is used for calling and executing the target function; a first judging unit, configured to read first test data in the first comparison memory space and second test data in the second comparison memory space; when the first test data is different from the first comparison data and/or the second test data is different from the second comparison data, the first judgment unit is further configured to determine that an output data overflow exists in the target function.
According to a fifth aspect, an embodiment of the present invention provides an apparatus for testing overflow of multiple output data of a function, including: a test unit, configured to perform an overflow test on each output data of the target function according to the first aspect or the method for testing overflow of output data of the function according to any embodiment of the first aspect; and the second judging unit is used for determining that the target function has output data overflow when any output data of the target function has overflow.
According to a sixth aspect, an embodiment of the present invention provides an apparatus for testing overflow of multiple output data of a function in parallel, including: the second comparison data generation unit is used for respectively generating a pair of comparison data for each output data of the objective function randomly; each pair of the comparison data comprises first comparison data and second comparison data; and the memory controller is used for writing the comparison data into corresponding comparison memory spaces respectively; each comparison memory space comprises a first comparison memory space used for storing the first comparison data and a second comparison memory space used for storing the second comparison data; the first comparison memory space and the second comparison memory space are respectively adjacent to a memory space for storing the corresponding output data; the second function execution unit is used for calling and executing the target function; a third determining unit, configured to read first test data in each of the first comparison memory spaces and second test data in each of the second comparison memory spaces; when any one of the first test data is different from the corresponding first comparison data, and/or any one of the second test data is different from the corresponding second comparison data, the third judgment unit is further configured to determine that an output data overflow exists in the objective function.
According to a seventh aspect, an embodiment of the present invention provides a terminal device, including: comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method according to the first aspect or any of the embodiments of the first aspect when executing the computer program; or, the processor, when executing the computer program, performs the steps of the method according to any of the second aspect or the second embodiment; alternatively, the processor, when executing the computer program, implements the steps of the method according to any of the third aspect or the embodiments of the third aspect.
According to an eighth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program, which when executed by a processor implements the steps of the method according to the first aspect or any of the embodiments of the first aspect; or the computer program, when executed by a processor, performs the steps of the method according to the second aspect or any of the embodiments of the second aspect; alternatively, the computer program realizes the steps of the method according to any of the embodiments of the third aspect or the third aspect when executed by a processor.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a flowchart illustrating an implementation of a specific example of a method for testing function output data overflow according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating an implementation of a specific example of a method for testing overflow of multiple output data of a function according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating an implementation of a specific example of a method for testing overflow of multiple output data of a function in parallel according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating an exemplary structure of an apparatus for testing function output data overflow according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating an exemplary structure of an apparatus for testing overflow of multiple output data of a function according to an embodiment of the present invention;
FIG. 6 is a diagram illustrating an exemplary structure of an apparatus for testing overflow of multiple output data of a function in parallel according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
In the development process of various computer software, memory overflow is a problem which is easy to occur, and function output data overflow is one of the main forms of memory overflow. A function is a sub-program unit in computer software that performs a specific task and can be called by other programs. The functions concerned by the embodiments of the present invention are mainly API (Application Programming Interface, abbreviated as API) functions, and may also be functions for transferring data between different modules and different software layers. Since function output data overflow usually occurs in the memory area adjacent to the output variable, detection and determination of the output data overflow can be realized by closely monitoring whether the memory areas adjacent to the front and back of the output variable are overwritten.
In some embodiments, as shown in FIG. 1, the testing for function output data overflow may be accomplished by:
step S101: first contrast data and second contrast data are randomly generated. In one embodiment, the random data R1 and R2 may be generated separately, and R1 is set as the first comparison data and R2 is set as the second comparison data. The first comparison data R1 and the second comparison data R2 are both stored in the backup file for later use.
Step S102: and writing the first comparison data into a preset first comparison memory space, and writing the second comparison data into a preset second comparison memory space. The first comparison memory space and the second comparison memory space are respectively adjacent to a preset target memory space for storing output data of the target function.
In one embodiment, a target memory space M for accommodating a target variable (i.e., an output data of the target function) may be allocated, the target variable is stored in M, and free memory spaces S1 and S2 are left before and after the target memory space M, respectively. S1 is a first comparison memory space; s2 is the second comparison memory space. It is not assumed that S1 is a comparison memory space located in front of and adjacent to the target memory space M, and S2 is a comparison memory space located behind and adjacent to the target memory space M. In practical applications, the first comparison data R1 randomly generated in step S101 may be written into the first comparison memory space S1, and the second comparison data R2 randomly generated in step S101 may be written into the second comparison memory space S2.
In particular, M should be equal to the length of the target variable. For example, when the target variable has a length of 16 bytes, M may be selected as 16 bytes, and 1000 bytes of memory space before and after M may be selected as S1 and S2, respectively. In addition, since overflow of function output data in practical applications generally overflows from the target memory space to the rear, that is, in the second contrast space S2 located behind the target memory space M, the probability of data overflow is higher. In order to improve the memory usage efficiency, more memory may be allocated to the second contrast space S2, i.e., the length of S2 may be greater than the length of S1.
Step S103: the target function is called and executed. In one embodiment, the target function may be called and executed with the target variable as a parameter. In the embodiment of the invention, the parameters of the objective function have the attribute of output or input before output.
In software engineering, a function interface description document should be provided when a function needs to be submitted for use by an external or other programmer. Each parameter in the function is described in the function interface description document, wherein the input and output attributes of the parameter are involved. The attribute of any parameter in the function is input, output or input-first-output.
When a target variable has the dual attributes of input and output, before a target function is called, an input value is assigned to the target variable; and after the target function is executed, storing the output data corresponding to the target variable into a target memory space M.
Step S104: and reading the first test data in the first comparison memory space and the second test data in the second comparison memory space. In one embodiment, after the objective function is operated, the first test data read from the first contrast memory space S1 is denoted as r1, and the second test data read from the second contrast memory space S2 is denoted as r 2.
Step S105: and judging whether the first test data is the same as the first comparison data. In one embodiment, the first test data R1 in the first comparison memory space S1 may be compared with the first comparison data R1 stored in the backup file. When the first test data R1 is not the same as the first comparative data R1, performing step S107; when the first test data R1 is identical to the first comparison data R1, step S106 is performed.
Step S106: and judging whether the second test data is the same as the second comparison data. In one embodiment, the second test data R2 in the second comparison memory space S2 may be compared with the second comparison data R2 stored in the backup file. When the second test data R2 is not the same as the second comparison data R2, performing step S107; when the second test data R2 is the same as the second comparison data R2, optionally, step S108 may be performed.
Step S107: and determining that the target function has output data overflow. The overflow of the output data of the function usually occurs in a loop operation, a miss occurs or additionally data is written more. When the error or extra written data is written into the memory space according to the sequence from the front to the back, namely the memory space is written from the low end to the high end of the address, the written data is immediately behind the target variable; when missed or extra-written data is written into the memory space in a back-to-front order, i.e. from the high end of the address to the low end of the address, then the written data immediately precedes the target variable. Therefore, by comparing the test data (including R1 and R2) in the memory space S1 with the backup file data (including R1 and R2), it can be determined whether the target function has data overflow. When the first test data R1 is not identical to the first comparison data R1 and/or the second test data R2 is not identical to the second comparison data R2, it can be determined that the target function has an output data overflow.
In addition, there may be a situation where the multi-written data is located at a place irrelevant to the target variable, and the probability of occurrence of this situation is extremely low, and the situation does not belong to the technical problem to be solved by the embodiment of the present invention.
In order to perform multiple overflow tests on the same objective function, optionally, the following steps may be added:
step S108: a test count is obtained. When the first test data R1 is the same as the first comparison data R1, and the second test data R2 is the same as the second comparison data R2, it can be determined that the objective function passes the overflow test. In the embodiment of the present invention, at the beginning of the overflow test, random numbers are used to fill both the first comparison memory space S1 and the second comparison memory space S2, but the content of the overflow overwrite is exactly the same as the random number. Therefore, it is necessary to reduce the probability of missed test to a level close to zero by performing a plurality of tests and changing the random number at the beginning of each test.
In one embodiment, the test count may be set to zero before the overflow test is performed on the target function; after each test, when the first test data R1 is the same as the first comparison data R1, and the second test data R2 is the same as the second comparison data R2, the test count may be increased by one, indicating that the test is successful.
Step S109: and judging whether the test count reaches a preset count threshold value. When the test count reaches a preset count threshold, executing step S110; when the test count does not reach the preset count threshold, returning to the step S101 until the first test data R1 is different from the first comparison data R1 and/or the second test data R2 is different from the second comparison data R2, and determining that the target function has output data overflow; or, when the test count reaches a preset count threshold, determining that the target function has no output data overflow.
Step S110: and determining that the target function has no output data overflow. In the process of performing overflow test on output data of the target function, it is required to ensure that all test results of repeated tests pass, and the test pass rate is ensured to reach 100%, so that the target function is indicated to have no data overflow problem; and once the condition that the test fails occurs, immediately terminating the test and judging that the target function has a data overflow problem.
After determining that there is no overflow of output data for the target function in step S110 or that there is overflow of output data for the target function in step S107, the memory spaces M, S1 and S2 allocated at the beginning of the test may also be released, thereby terminating the test.
It should be noted that, in the embodiment of the present invention, the number of times of the repeated tests, that is, the preset count threshold is not limited, and the user may determine the count threshold by self-balancing according to the test time, the test hand, and the expected quality level. In one embodiment, the count threshold may be set to 200.
According to the method for testing the overflow of the function output data, provided by the embodiment of the invention, the overflow test of the target function output data is realized by detecting whether data tampering occurs in two comparison memory spaces adjacent to the target memory space of the output data after the target function is executed. Since function output data overflow usually occurs in the memory area adjacent to the output variable, detection and determination of the output data overflow can be realized by closely monitoring whether the memory areas adjacent to the front and back of the output variable are overwritten. The method for testing the overflow of the function output data provided by the embodiment of the invention can detect the overflow of the memory without obvious abnormal performance in real time, can dynamically detect the overflow of the function output data in the process of program operation, and solves the problem of low test reliability of the overflow test of the function output data in the prior art.
An embodiment of the present invention further provides a method for testing overflow of multiple output data of a function, as shown in fig. 2, the method may include the following steps:
step S201: and respectively carrying out overflow test on each output data of the objective function. In a specific embodiment, the overflow test may be performed on each output data of the objective function according to the method for testing overflow of output data of the function shown in fig. 1.
Step S202: and judging whether overflow exists in any output data of the objective function. When there is overflow in any output data of the objective function, executing step S203; when there is no overflow in each output data of the objective function, step S204 is performed.
Step S203: and determining that the target function has output data overflow.
Step S204: and determining that the target function has no output data overflow.
The overflow test for a plurality of output data can be regarded as a superposition of the overflow tests for each output data. In the method for testing the overflow of the multiple output data of the function shown in fig. 2, the test step of a single output variable is executed multiple times in sequence, and the overflow test of the multiple output data in the target function is realized in a serial test mode.
For example, a certain target function fun () has two output variables o1 and o2, whose prototype is int fun (char o1, char o 2); when the overflow test is performed on the target function, firstly, the output variable o1 is tested according to the test procedure of the single output variable shown in fig. 1; the output variable o2 was then tested according to the single output variable test procedure shown in FIG. 1. In the method for testing the overflow of a plurality of output data of the function shown in fig. 2, a plurality of calls need to be made to the target function according to the number of the output data.
According to the method for testing the overflow of the multiple output data of the function, provided by the embodiment of the invention, the target function is called for multiple times, and the overflow test is carried out on each output data of the target function one by one, so that the comprehensive overflow detection can be carried out on the target function, the memory overflow without obvious abnormal performance can be detected in real time, the overflow of the function output data can be dynamically detected in the program running process, and the problem of low test reliability in the overflow test of the function output data in the prior art is solved.
An embodiment of the present invention further provides a method for testing overflow of multiple output data of a function in parallel, as shown in fig. 3, the method may include the following steps:
step S301: a pair of comparison data is randomly generated for each output data of the objective function, respectively. In a specific embodiment, each pair of comparison data includes first comparison data R1 and second comparison data R2. The respective first comparison data R1 and second comparison data R2 are stored in the backup file for use in the subsequent steps.
Step S302: and respectively writing the comparison data into the corresponding comparison memory spaces. In one embodiment, each of the comparison memory spaces includes a first comparison memory space S1 for storing the first comparison data R1 and a second comparison memory space S2 for storing the second comparison data R2. The first and second comparison memory spaces S1 and S2 are respectively adjacent to the memory space M for storing corresponding output data.
Step S303: the target function is called and executed.
Step S304: and reading the first test data in each first comparison memory space and the second test data in each second comparison memory space. In one embodiment, after the target function is called and executed in step S303, the first test data r1 in each first comparison memory space S and the second test data r2 in each second comparison memory space S2 may be read sequentially.
Step S305: and judging whether any first test data is the same as the corresponding first comparison data. When any one of the first test data R1 is not identical to the corresponding first comparison data R1, executing step S307; when any one of the first test data R1 and the corresponding first comparison data R1 are the same, step S306 is executed:
step S306: and judging whether any second test data is the same as the corresponding second comparison data. When any one of the second test data R2 is not the same as the corresponding second comparison data R2, executing step S307; when any one of the second test data R2 is identical to the corresponding second comparison data R2, optionally, step S308 may be performed.
Step S307: and determining that the target function has output data overflow. When any one of the first test data R1 is not identical to the corresponding first comparison data R1 and/or any one of the second test data R2 is not identical to the corresponding second comparison data R2, it can be determined that the target function has an output data overflow.
In order to perform multiple parallel overflow tests on the same objective function, optionally, the following steps may be added:
step S308: a test count is obtained. When any one of the first test data R1 is the same as the corresponding first comparison data R1, and any one of the second test data R2 is the same as the corresponding second comparison data R2, it can be determined that the objective function passes the overflow test. In the embodiment of the present invention, at the beginning of the overflow test, random numbers are used to fill in each of the first comparison memory space S1 and each of the second comparison memory space S2, but the content of the overflow overwrite is exactly the same as the random number. Therefore, it is necessary to reduce the probability of missed test to a level close to zero by performing a plurality of tests and changing the random number at the beginning of each test.
Step S309: and judging whether the test count reaches a preset count threshold value. When the test count reaches the preset count threshold, step S310 is executed: when the tested count does not reach the preset count threshold, returning to the step S301 until any first test data R1 is different from the corresponding first comparison data R1 and/or any second test data R2 is different from the corresponding second comparison data R2, and determining that the output data of the scalar function overflows; or, when the test count reaches a preset count threshold, determining that the target function has no output data overflow.
Step S310: and determining that the target function has no output data overflow.
In the method for testing the overflow of a plurality of output data of a function in parallel shown in FIG. 3, only one call is made to the target function. The method realizes the parallel overflow detection of a plurality of output variables in the objective function and has higher detection efficiency. In the method for testing overflow of multiple output data of a function in parallel shown in fig. 3, each step in the single output variable testing method shown in fig. 1 is circularly expanded, and the number of times of circular operation in each step is the number of output variables.
For example, if a certain objective function has n output variables, n pairs of comparison data are randomly generated in step S301; in step S302, n pairs of comparison memory spaces are allocated, each pair of comparison memory spaces including a first comparison memory space S1 and a second comparison memory space S2; in step S303, n output variables are all used as interface parameters of the target function, but the function is called only once.
The method for testing overflow of a plurality of output data of a function in parallel provided by the embodiment of the invention only needs to call the target function once, and by detecting whether data tampering occurs in two comparison memory spaces adjacent to the target memory space of each output data after the target function is executed, overflow testing of the output data of the target function is realized. Since function output data overflow usually occurs in the memory area adjacent to the output variable, detection and determination of the output data overflow can be realized by closely monitoring whether the memory areas adjacent to the front and back of the output variable are overwritten. The method for testing overflow of a plurality of output data of a function in parallel provided by the embodiment of the invention can detect the overflow of the memory without obvious abnormal performance in real time, and can dynamically detect the overflow of the output data of the function in the process of program operation, thereby solving the problem of low test reliability of the overflow test of the output data of the function in the prior art.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
An embodiment of the present invention further provides a device for testing function output data overflow, as shown in fig. 4, the device may include: a first comparative data generation unit 401, a first function execution unit 402, and a first judgment unit 403.
The first comparison data generation unit 401 is configured to randomly generate first comparison data and second comparison data; the first comparison data are written into a preset first comparison memory space, and the second comparison data are written into a preset second comparison memory space; the first comparison memory space and the second comparison memory space are respectively adjacent to a preset target memory space, and the target memory space is used for storing output data of a target function; the specific working process of the method can be referred to as step S101 to step S102 in the above method embodiment.
The first function execution unit 402 is configured to call and execute a target function; the specific working process can be referred to step S103 in the above method embodiment.
The first determining unit 403 is configured to read first test data in the first comparison memory space and second test data in the second comparison memory space; the specific working process can be referred to as step S104 in the above method embodiment.
When the first test data is different from the first comparison data and/or the second test data is different from the second comparison data, the first determining unit 403 is further configured to determine that an output data overflow exists in the target function; the specific working process can be referred to the steps S105 to S107 in the above method embodiment.
Optionally, the apparatus for testing overflow of function output data according to the embodiment of the present invention may further include a first test counting unit 404.
When the first test data is the same as the first comparison data, and the second test data is the same as the second comparison data, the first test counting unit 404 may be configured to obtain a test count; the specific working process can be referred to as step S108 in the above method embodiment.
The first test counting unit 404 may be further configured to determine whether the test count reaches a preset count threshold; the specific working process can be referred to step S109 in the above method embodiment.
When the test count reaches a preset count threshold, the first judging unit 403 is further configured to determine that there is no output data overflow in the target function; the specific working process can be referred to as step S110 in the above method embodiment.
When the test count does not reach the preset count threshold, the first test count unit 404 may be further configured to feed back the correspondence information to the first comparative data generation unit 401, so as to instruct the first comparative data generation unit 401 to repeatedly start the overflow test on the target function.
An embodiment of the present invention further provides a device for testing overflow of multiple output data of a function, as shown in fig. 5, the device may include: a test unit 501 and a second decision unit 502.
The test unit 501 is configured to perform an overflow test on each output data of the target function according to the method for testing overflow of the output data of the function shown in fig. 1; the specific working process of the method can be referred to as step S201 in the above method embodiment.
When any output data of the objective function has overflow, the second judging unit 502 is configured to determine that the output data of the objective function has overflow; the specific working process can be referred to step S202 and step S203 in the above method embodiment.
Optionally, when there is no overflow in any output data of the target function, the second determining unit 502 may be further configured to determine that there is no overflow in the output data of the target function; the specific working process can be referred to step S202 and step S204 in the above method embodiment.
An embodiment of the present invention further provides a device for testing overflow of multiple output data of a function in parallel, and as shown in fig. 6, the device may include: a second comparative data generation unit 601, a second function execution unit 602, and a third judgment unit 603.
The second comparison data generation unit 601 is configured to randomly generate a pair of comparison data for each output data of the objective function; each pair of comparison data comprises first comparison data and second comparison data; the specific working process can be referred to as step S301 in the above method embodiment.
The second comparison data generation unit 601 is further configured to write the comparison data into corresponding comparison memory spaces respectively; each comparison memory space comprises a first comparison memory space used for storing the first comparison data and a second comparison memory space used for storing the second comparison data; the first comparison memory space and the second comparison memory space are respectively adjacent to a memory space for storing corresponding output data; the specific working process can be referred to as step S302 in the above method embodiment.
The second function execution unit 602 is configured to call and execute a target function; the specific working process of the method can be referred to as step S303 in the above method embodiment.
The third determining unit 603 is configured to read the first test data in each first comparison memory space and the second test data in each second comparison memory space; the specific working process of the method can be referred to as step S304 in the above method embodiment.
When any first test data is different from the corresponding first comparison data, and/or any second test data is different from the corresponding second comparison data, the third judging unit 603 is further configured to determine that an output data overflow exists in the target function; the specific working process of the method can be referred to as step S305 to step S307 in the above method embodiment.
Optionally, the apparatus for testing overflow of multiple output data of a function in parallel according to the embodiment of the present invention may further include a second test counting unit 604.
When each first test data is the same as the corresponding first comparison data, and each second test data is also the same as the corresponding second comparison data, the second test counting unit 604 may be configured to obtain a test count; the specific working process of the method can be referred to as step S308 in the above method embodiment.
The second test counting unit 604 may be further configured to determine whether the test count reaches a preset count threshold; the specific working process of the method can be referred to as step S309 in the above method embodiment.
When the test count reaches the preset count threshold, the second judging unit 603 is further configured to determine that the target function has no output data overflow; the specific working process can be referred to step S310 in the above method embodiment.
When the test count does not reach the preset count threshold, the second test counting unit 604 may be further configured to feed back the corresponding information to the second comparative data generating unit 601, so as to instruct the second comparative data generating unit 601 to repeatedly start the overflow test on the target function.
Fig. 7 is a schematic diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 7, the terminal device 700 of this embodiment includes: a processor 701, a memory 702, and a computer program 703, such as a test function output data overflow program, stored in the memory 702 and executable on the processor 701. The processor 701 implements the steps in the above-described method embodiments, such as the steps S101 to S110 shown in fig. 1, when executing the computer program 703. Alternatively, the processor 701, when executing the computer program 703, implements the functions of each module/unit in each device embodiment described above, for example, the functions of the first comparative data generation unit 401, the first function execution unit 402, and the first determination unit 403 shown in fig. 4.
The computer program 703 may be divided into one or more modules/units, which are stored in the memory 702 and executed by the processor 701 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used for describing the execution process of the computer program 703 in the terminal device 700. For example, the computer program 703 may be divided into a synchronization module, a summarization module, an acquisition module, a return module (a module in a virtual device).
The terminal device 700 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 701, a memory 702. Those skilled in the art will appreciate that fig. 7 is merely an example of a terminal device 700 and does not constitute a limitation of terminal device 700 and may include more or fewer components than shown, or some components may be combined, or different components, e.g., the terminal device may also include input-output devices, network access devices, buses, etc.
The Processor 701 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 702 may be an internal storage unit of the terminal device 700, such as a hard disk or a memory of the terminal device 700. The memory 702 may also be an external storage device of the terminal device 700, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the terminal device 700. Further, the memory 702 may also include both an internal storage unit and an external storage device of the terminal device 700. The memory 702 is used for storing the computer program and other programs and data required by the terminal device. The memory 702 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. . Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (13)

1. A method for testing function output data overflow, comprising:
randomly generating first comparison data and second comparison data;
writing the first comparison data into a preset first comparison memory space, and writing the second comparison data into a preset second comparison memory space; the first comparison memory space and the second comparison memory space are respectively adjacent to a preset target memory space, and the target memory space is used for storing output data of a target function; the target memory space is equal to the length of the output data; the first comparison memory space is larger than the target memory space, and the second comparison memory space is larger than the target memory space;
calling and executing the target function;
reading first test data in the first comparison memory space and second test data in the second comparison memory space;
and when the first test data is different from the first comparison data and/or the second test data is different from the second comparison data, determining that the target function has output data overflow.
2. The method of testing for function output data overflow of claim 1, wherein the function output data overflow testing method further comprises:
when the first test data is the same as the first comparison data and the second test data is the same as the second comparison data, acquiring a test count;
and when the test count reaches a preset count threshold value, determining that the target function has no output data overflow.
3. The method of testing for function output data overflow of claim 2, wherein the function output data overflow testing method further comprises:
when the test count does not reach a preset count threshold value, the random generation of the first comparison data and the second comparison data is repeatedly executed; writing the first comparison data into a preset first comparison memory space, and writing the second comparison data into a preset second comparison memory space; the first comparison memory space and the second comparison memory space are respectively adjacent to a preset target memory space, and the target memory space is used for storing output data of a target function; the target memory space is equal to the length of the output data; the first comparison memory space is larger than the target memory space, and the second comparison memory space is larger than the target memory space; calling and executing the target function; reading first test data in the first comparison memory space and second test data in the second comparison memory space until the first test data is different from the first comparison data and/or the second test data is different from the second comparison data, and determining that the target function has output data overflow; or determining that the target function has no output data overflow until the test count reaches a preset count threshold.
4. A method for testing for overflow of a plurality of output data of a function, comprising:
the method for testing overflow of function output data according to any one of claims 1 to 3, wherein an overflow test is performed on each output data of the objective function;
and when any output data of the objective function has overflow, determining that the output data of the objective function has overflow.
5. The method for testing for overflow of a plurality of output data from a function of claim 4, wherein the method for testing for overflow of a plurality of output data from a function further comprises:
and when the overflow of each output data of the objective function does not exist, determining that the overflow of the output data does not exist in the objective function.
6. A method for testing overflow of multiple output data of a function in parallel, comprising:
respectively randomly generating a pair of comparison data for each output data of the objective function; each pair of the comparison data comprises first comparison data and second comparison data;
respectively writing the comparison data into corresponding comparison memory spaces; each comparison memory space comprises a first comparison memory space used for storing the first comparison data and a second comparison memory space used for storing the second comparison data; the first comparison memory space and the second comparison memory space are respectively adjacent to a memory space for storing the corresponding output data; the memory space for storing the corresponding output data is equal to the length of the output data; the first comparison memory space is larger than the memory space for storing the corresponding output data, and the second comparison memory space is larger than the memory space for storing the corresponding output data;
calling and executing the target function;
reading first test data in each first comparison memory space and second test data in each second comparison memory space;
and when any first test data is different from the corresponding first comparison data and/or any second test data is different from the corresponding second comparison data, determining that the target function has output data overflow.
7. The method of testing for overflow of a plurality of output data from a function in parallel of claim 6, wherein the method of testing for overflow of a plurality of output data from a function in parallel further comprises:
when any one of the first test data is the same as the corresponding first comparison data and any one of the second test data is the same as the corresponding second comparison data, acquiring a test count;
and when the test count reaches a preset count threshold value, determining that the target function has no output data overflow.
8. The method of testing for overflow of a plurality of output data from a function in parallel of claim 7, wherein the method of testing for overflow of a plurality of output data from a function in parallel further comprises:
when the test count does not reach a preset count threshold value, repeatedly executing the output data respectively serving as the target function to randomly generate a pair of comparison data; each pair of the comparison data comprises first comparison data and second comparison data; respectively writing the comparison data into corresponding comparison memory spaces; each comparison memory space comprises a first comparison memory space used for storing the first comparison data and a second comparison memory space used for storing the second comparison data; the first comparison memory space and the second comparison memory space are respectively adjacent to a memory space for storing the corresponding output data; the memory space for storing the corresponding output data is equal to the length of the output data; the first comparison memory space is larger than the memory space for storing the corresponding output data, and the second comparison memory space is larger than the memory space for storing the corresponding output data; calling and executing the target function; reading first test data in each first comparison memory space and second test data in each second comparison memory space until output data overflow of the target function is determined when any first test data is different from the corresponding first comparison data and/or any second test data is different from the corresponding second comparison data; or determining that the target function has no output data overflow until the test count reaches a preset count threshold.
9. An apparatus for testing function output data for overflow, comprising:
a first comparison data generation unit for randomly generating first comparison data and second comparison data; the first comparison data is written into a preset first comparison memory space, and the second comparison data is written into a preset second comparison memory space; the first comparison memory space and the second comparison memory space are respectively adjacent to a preset target memory space, and the target memory space is used for storing output data of a target function; the target memory space is equal to the length of the output data; the first comparison memory space is larger than the target memory space, and the second comparison memory space is larger than the target memory space;
the first function execution unit is used for calling and executing the target function;
a first judging unit, configured to read first test data in the first comparison memory space and second test data in the second comparison memory space; when the first test data is different from the first comparison data and/or the second test data is different from the second comparison data, the first judgment unit is further configured to determine that an output data overflow exists in the target function.
10. An apparatus for testing for overflow of a plurality of output data of a function, comprising:
a test unit, configured to perform overflow test on each output data of the objective function according to the method for testing overflow of output data of a function in any one of claims 1 to 3;
and the second judging unit is used for determining that the target function has output data overflow when any output data of the target function has overflow.
11. An apparatus for testing function multiple output data overflows in parallel, comprising:
the second comparison data generation unit is used for respectively generating a pair of comparison data for each output data of the objective function randomly; each pair of the comparison data comprises first comparison data and second comparison data; and the memory controller is used for writing the comparison data into corresponding comparison memory spaces respectively; each comparison memory space comprises a first comparison memory space used for storing the first comparison data and a second comparison memory space used for storing the second comparison data; the first comparison memory space and the second comparison memory space are respectively adjacent to a memory space for storing the corresponding output data; the memory space for storing the corresponding output data is equal to the length of the output data; the first comparison memory space is larger than the memory space for storing the corresponding output data, and the second comparison memory space is larger than the memory space for storing the corresponding output data;
the second function execution unit is used for calling and executing the target function;
a third determining unit, configured to read first test data in each of the first comparison memory spaces and second test data in each of the second comparison memory spaces; when any one of the first test data is different from the corresponding first comparison data, and/or any one of the second test data is different from the corresponding second comparison data, the third judgment unit is further configured to determine that an output data overflow exists in the objective function.
12. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 3 when executing the computer program; or the processor, when executing the computer program, implements the steps of the method according to claim 4 or 5; alternatively, the processor, when executing the computer program, implements the steps of the method of any of claims 6 to 8.
13. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 3; or the computer program, when being executed by a processor, carries out the steps of the method according to claim 4 or 5; alternatively, the computer program realizes the steps of the method according to any one of claims 6 to 8 when executed by a processor.
CN201910080047.6A 2019-01-28 2019-01-28 Method for testing function output data overflow, terminal equipment and storage medium Active CN109885402B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910080047.6A CN109885402B (en) 2019-01-28 2019-01-28 Method for testing function output data overflow, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910080047.6A CN109885402B (en) 2019-01-28 2019-01-28 Method for testing function output data overflow, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109885402A CN109885402A (en) 2019-06-14
CN109885402B true CN109885402B (en) 2021-06-08

Family

ID=66927110

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910080047.6A Active CN109885402B (en) 2019-01-28 2019-01-28 Method for testing function output data overflow, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109885402B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101290596A (en) * 2008-05-23 2008-10-22 中兴通讯股份有限公司 Tasks stack overflow real-time detection method and apparatus
US8621337B1 (en) * 2010-09-30 2013-12-31 Juniper Networks, Inc. Detecting memory corruption
CN104714885A (en) * 2015-02-13 2015-06-17 小米科技有限责任公司 Method and device for detecting stack overflow position
CN105912458A (en) * 2016-03-28 2016-08-31 中国电力科学研究院 Method and system for dynamically detecting C/C++ memory leak
CN106201727A (en) * 2016-07-27 2016-12-07 浪潮(北京)电子信息产业有限公司 The EMS memory management process of a kind of operating system and device
CN107491373A (en) * 2017-08-09 2017-12-19 杭州迪普科技股份有限公司 A kind of task stack overflow monitoring method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101290596A (en) * 2008-05-23 2008-10-22 中兴通讯股份有限公司 Tasks stack overflow real-time detection method and apparatus
US8621337B1 (en) * 2010-09-30 2013-12-31 Juniper Networks, Inc. Detecting memory corruption
CN104714885A (en) * 2015-02-13 2015-06-17 小米科技有限责任公司 Method and device for detecting stack overflow position
CN105912458A (en) * 2016-03-28 2016-08-31 中国电力科学研究院 Method and system for dynamically detecting C/C++ memory leak
CN106201727A (en) * 2016-07-27 2016-12-07 浪潮(北京)电子信息产业有限公司 The EMS memory management process of a kind of operating system and device
CN107491373A (en) * 2017-08-09 2017-12-19 杭州迪普科技股份有限公司 A kind of task stack overflow monitoring method and system

Also Published As

Publication number Publication date
CN109885402A (en) 2019-06-14

Similar Documents

Publication Publication Date Title
CN107832062B (en) Program updating method and terminal equipment
CN111124926B (en) Fuzzy test method and device, electronic equipment and storage medium
US11036507B2 (en) Processor testing using pairs of counter incrementing and branch instructions
CN108197032B (en) Main thread jamming monitoring method, medium, equipment and system for IOS application
US20080127112A1 (en) Software tracing
CN112333246B (en) ABtest experiment method and device, intelligent terminal and storage medium
CN109634822B (en) Function time consumption statistical method and device, storage medium and terminal equipment
JP7135853B2 (en) Reduce buffer overflow
CN114676040A (en) Test coverage verification method and device and storage medium
CN113127314A (en) Method and device for detecting program performance bottleneck and computer equipment
CN101533370B (en) Memory abnormal access positioning method and device
CN109885402B (en) Method for testing function output data overflow, terminal equipment and storage medium
CN110032508B (en) Function driver test method, device, terminal device and storage medium
CN116820853A (en) Analysis method and device of chip test data, electronic equipment and storage medium
CN111143092A (en) Fault recording data processing method and system and terminal equipment
CN116192776A (en) Message order-preserving method and device capable of self-repairing, terminal and storage medium
CN113360402B (en) Test method, electronic equipment, chip and storage medium
CN115966237A (en) Screening method and device for bad blocks of hard disk, storage medium and electronic device
US10496524B2 (en) Separating test coverage in software processes using shared memory
CN112216333B (en) Chip testing method and device
CN111858307B (en) Fuzzy test method and equipment
CN110716747B (en) Program operation efficiency optimization method based on function parameter statistics and terminal equipment
CN113850664A (en) Data anomaly detection method and data reporting service
CN112527265A (en) Method for automatically injecting logs and computer equipment
CN110908869A (en) Application program data monitoring method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant