CN110674050B - Memory out-of-range detection method and device, electronic equipment and computer storage medium - Google Patents

Memory out-of-range detection method and device, electronic equipment and computer storage medium Download PDF

Info

Publication number
CN110674050B
CN110674050B CN201910950733.4A CN201910950733A CN110674050B CN 110674050 B CN110674050 B CN 110674050B CN 201910950733 A CN201910950733 A CN 201910950733A CN 110674050 B CN110674050 B CN 110674050B
Authority
CN
China
Prior art keywords
memory
space
detected
memory space
identification
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
CN201910950733.4A
Other languages
Chinese (zh)
Other versions
CN110674050A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910950733.4A priority Critical patent/CN110674050B/en
Publication of CN110674050A publication Critical patent/CN110674050A/en
Application granted granted Critical
Publication of CN110674050B publication Critical patent/CN110674050B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing

Abstract

The invention provides a memory out-of-range detection method, a device, electronic equipment and a computer storage medium, wherein the method is used for the memory out-of-range detection of memory spaces to be detected, and read-only area identification is stored in each memory space to be detected; the method comprises the following steps: when at least one memory space to be detected meets the detection condition, calling a memory out-of-range detection function based on the space identification of the memory space to be detected meeting the detection condition, and detecting the identification state of the read-only area identification of the target memory space corresponding to the space identification by the memory out-of-range detection function according to the space identification; and determining whether the target memory space is out of range of the memory according to the identification state of the read-only area identification. By the scheme, the read-only area identification of the target memory space is detected by the called memory boundary-crossing detection function based on the read-only area identification stored in each memory space to be detected, so that the memory boundary-crossing detection can be realized.

Description

Memory out-of-range detection method and device, electronic equipment and computer storage medium
Technical Field
The invention relates to the technical field of computer processing, in particular to a visual memory out-of-range detection method and device, electronic equipment and a computer storage medium.
Background
In the prior art, the method for detecting the memory boundary crossing mainly comprises the following steps: in the first mode, detection is performed according to a detection tool developed by a third party. In the second mode, paging is performed on the memory space to be detected, the distribution position of the memory space is adjusted to make the ending section of the memory space exactly aligned with the system paging boundary, and then an inaccessible page is distributed at the boundary as a protection area. Therefore, once the memory is out of range, the process can not work normally, and the user is helped to detect the memory out of range.
Of the two ways, the first way needs a memory out-of-range detection tool depending on a third party, so that the scheme has limitations. In the second method, when the memory out-of-range detection is performed each time, paging processing needs to be performed on each memory space to be detected, that is, the memory space is changed greatly, so that the method is complex and has poor applicability.
Disclosure of Invention
The objective of the present invention is to solve at least one of the above technical drawbacks, to simplify the complexity of the out-of-range memory detection, and to improve the applicability of the method. The technical scheme adopted by the invention is as follows:
in a first aspect, the present invention provides a memory out-of-range detection method, which is used for detecting the memory out-of-range of memory spaces to be detected, wherein each memory space to be detected stores a read-only area identifier; the method comprises the following steps:
when at least one memory space to be detected meets the detection condition, calling a memory out-of-range detection function based on the space identification of the memory space to be detected meeting the detection condition;
detecting the identification state of a read-only area identification of a target memory space corresponding to the space identification by a memory out-of-range detection function according to the space identification;
and determining whether the target memory space is out of range of the memory according to the identification state of the read-only area identification.
In an embodiment of the first aspect of the present invention, the space identifier is a memory address.
In an embodiment of the first aspect of the invention, the method further comprises:
constructing a base class of all memory spaces to be detected, wherein member variables of the base class comprise member variables corresponding to all the memory spaces to be detected, and read-only marks are stored in memory areas corresponding to the designated member variables of the memory spaces to be detected;
and constructing a memory boundary crossing detection function, wherein the memory boundary crossing detection function inherits the base class.
In an embodiment of the first aspect of the invention, the method further comprises:
and when a new memory space exists and the memory out-of-range detection is required, adding member variables of the new memory space into the base class.
In an embodiment of the first aspect of the present invention, a member variable is designated as a first member variable;
detecting the identification state of the read-only area identification of the target memory space corresponding to the space identification, comprising:
and detecting the identification state of the read-only area identification in the memory area corresponding to the first member variable in the target memory space corresponding to the space identification.
In an embodiment of the first aspect of the invention, the method further comprises:
and storing the space identification of the memory space to be detected to a specified storage position.
In an embodiment of the first aspect of the present invention, when a memory violation occurs in the memory space to be detected, the method further includes:
and generating memory boundary crossing reminding information based on the space identification of the memory space where the memory boundary crossing occurs, and providing the memory boundary crossing reminding information for a user.
In an embodiment of the first aspect of the invention, the method further comprises:
storing the space related information of the memory space to be detected and the space identification in a specified storage position in an associated manner;
generating memory out-of-range reminding information based on the space identification of the memory space where the memory out-of-range occurs, wherein the method comprises the following steps:
based on the space identification of the memory space where the memory boundary crossing occurs, acquiring space related information of the memory space where the memory boundary crossing occurs from the specified storage position;
and generating memory out-of-range reminding information based on the space identification of the memory space in which the memory out-of-range occurs and the corresponding space related information.
In the embodiment of the first aspect of the present invention, the read-only area identifier is a set character string, and the identifier status includes changed and unchanged;
determining whether the memory boundary crossing occurs in the target memory space according to the identification state of the read-only area identification, wherein the method comprises the following steps:
if the character string changes, the target memory space is out of range;
if the character string is not changed, the target memory space is not out of range of the memory.
In an embodiment of the first aspect of the present invention, the string of characters is a devil's number.
In an embodiment of the first aspect of the present invention, the memory space to be detected is a read-only space.
In a second aspect, the present invention provides a device for detecting a memory boundary crossing, where the device is used for detecting a memory boundary crossing of memory spaces to be detected, and each memory space to be detected stores a read-only area identifier; the device includes:
a target memory space determining module, configured to call a memory out-of-range detection function based on the space identifier of the to-be-detected memory space satisfying the detection condition when at least one to-be-detected memory space satisfies the detection condition,
the identification state detection module is used for detecting the identification state of the read-only area identification of the target memory space corresponding to the space identification by the memory out-of-range detection function according to the space identification;
and the memory out-of-range detection module is used for determining whether the memory out-of-range occurs in the target memory space according to the identification state of the read-only area identification.
In an embodiment of the second aspect of the present invention, the space identifier is a memory address.
In an embodiment of the second aspect of the invention, the apparatus further comprises:
the base class and detection function construction module is used for constructing base classes of all the memory spaces to be detected, member variables of the base classes comprise member variables corresponding to all the memory spaces to be detected, and the read-only marks are stored in memory areas corresponding to the designated member variables of the memory spaces to be detected; and constructing a memory boundary crossing detection function, wherein the memory boundary crossing detection function inherits the base class.
In an embodiment of the second aspect of the invention, the apparatus further comprises:
and the member variable adding module is used for adding the member variables of the new memory space into the base class when the new memory space exists and the memory out-of-range detection is required.
In an embodiment of the second aspect of the present invention, the member variable is designated as a first member variable;
the identifier state detection module, when detecting the identifier state of the read-only area identifier of the target memory space corresponding to the space identifier, is specifically configured to:
and detecting the identification state of the read-only area identification in the memory area corresponding to the first member variable in the target memory space corresponding to the space identification.
In an embodiment of the second aspect of the invention, the apparatus further comprises:
and the storage module is used for storing the space identifier of the memory space to be detected to the appointed storage position.
In an embodiment of the second aspect of the invention, the apparatus further comprises:
and the memory out-of-range reminding information generating module is used for generating memory out-of-range reminding information based on the space identification of the memory space in which the memory out-of-range occurs when the memory out-of-range occurs in the memory space to be detected, and providing the memory out-of-range reminding information for a user.
In an embodiment of the second aspect of the present invention, the storage module is further configured to store the space-related information of the memory space to be detected and the space identifier in association with a specified storage location;
the memory out-of-range prompting information generating module is specifically configured to, when generating the memory out-of-range prompting information based on the space identifier of the memory space where the memory out-of-range occurs:
based on the space identification of the memory space where the memory boundary crossing occurs, acquiring space related information of the memory space where the memory boundary crossing occurs from the specified storage position;
and generating memory out-of-range reminding information based on the space identification of the memory space in which the memory out-of-range occurs and the corresponding space related information.
In the embodiment of the second aspect of the present invention, the read-only area identifier is a set character string, and the identifier status includes changed and unchanged;
the memory boundary crossing detection module is specifically configured to, when determining whether the memory boundary crossing occurs in the target memory space according to the identifier state of the read-only area identifier:
if the character string changes, the target memory space is out of range;
if the character string is not changed, the target memory space is not out of range of the memory.
In an embodiment of the second aspect of the present invention, the character string is a devil's number.
In an embodiment of the second aspect of the present invention, the memory space to be detected is a read-only space.
In a third aspect, the present invention provides an electronic device, comprising:
a processor and a memory;
a memory for storing computer operating instructions;
a processor for performing the method as shown in any of the embodiments of the first aspect of the present invention by invoking computer operational instructions.
In a fourth aspect, the present invention provides a computer readable storage medium having stored thereon at least one instruction, at least one program, set of codes, or set of instructions, which is loaded into and executed by a processor to implement a method as set forth in any one of the embodiments of the first aspect of the invention.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the method, the device, the electronic device and the computer storage medium for detecting the memory out-of-bounds of the embodiments of the present invention, when at least one memory space to be detected satisfies the detection condition, a memory out-of-bounds detection function can be called based on the space identifier of the memory space to be detected satisfying the detection condition, the memory out-of-bounds detection function can detect the identifier status of the read-only region identifier in the target memory space corresponding to the space identifier based on the space identifier, and determine whether the memory out-of-bounds occurs in the target memory space by using the identifier status, in this scheme, since the read-only region identifier is stored in each memory space to be detected, when the memory space to be detected needs to be detected, the read-only region identifier of the target memory space corresponding to the space identifier is detected by the called memory out-of bounds detection function based on the space identifier of the memory space to be detected, the method can realize the detection of the memory space to be detected without other additional settings, and has simple realization and strong applicability.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly described below.
Fig. 1 is a schematic flowchart illustrating a memory out-of-range detection method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart illustrating a method for detecting a memory boundary crossing according to an example provided by the embodiment of the present invention;
fig. 3 is a schematic flowchart illustrating a memory out-of-range detection method according to another example provided by the embodiment of the present invention;
FIG. 4 is a schematic flow chart illustrating a method for detecting a memory boundary crossing based on a game scenario according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a memory boundary crossing detection apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below by referring to the drawings are exemplary only for explaining technical aspects of the present invention, and are not construed as limiting the present invention.
As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
In order to better understand the scheme provided by the embodiment of the present invention, first, a brief description is given below to the related art of memory crossing.
Memory violations are one of the major errors in software systems, and the consequences are often unpredictable and very serious. Further troubling, it occurs at random times, presents random symptoms, and has random consequences that make it difficult for programmers to find out the connections between the phenomena and the nature of the bugs, thereby making positioning of the bugs extremely difficult. Generally, the memory out-of-range access can be divided into the following two types:
reading out an out-of-range: i.e. data not belonging to itself is read. If the read memory address is invalid, the program will crash immediately; if the memory address being read is valid, no immediate problem will occur at the time of reading, but because the data being read is random, it will have unpredictable consequences.
Writing out an out-of-range: also known as buffer overflow, the data written is random to other processes, which can also have unpredictable consequences.
In the prior art, the method for detecting the memory boundary crossing mainly includes the following modes:
the first mode is as follows: and detecting according to a detection tool developed by a third party, for example, detecting the memory out-of-range by adopting an Address Santizer tool.
The second mode is as follows: the memory out-of-range verification scheme based on memory paging comprises the following general flows: paging the memory space to be detected, adjusting the allocation position of the memory space to make the ending section of the memory space just aligned with the system paging boundary, and then allocating one more inaccessible page as a protection area at the boundary. Therefore, once the memory is out of range, the process can not work normally, and the user is helped to detect the memory out of range in time.
The third mode is as follows: judging whether the devil figures in the class structure are changed, specifically: and constructing a class structure for the memory space, setting the magic numbers in the class structure, and detecting whether the magic numbers in the memory space change or not when the memory space needs to be detected.
Although the above three methods can achieve the detection of the memory boundary crossing, the inventors of the present invention have found that the following defects still exist in the above three methods:
the first mode is as follows: depending on a memory out-of-range detection tool of a third party, when the memory detection is performed based on the detection tool, a plug-in corresponding to the detection tool needs to be installed on hardware equipment corresponding to a memory space to be detected, so that the system performance is affected, and the system consumption is large.
The second mode is as follows: when the memory out-of-range detection is needed, paging processing needs to be performed on each memory space to be detected, that is, the memory space is changed greatly, so that the method is complex.
The third mode is as follows: when the memory space to be detected is detected, a new section of code aiming at the memory space needs to be handwritten every time one memory space is registered, the cost of code handwriting is high, and errors are easy to make.
In order to solve at least one technical defect existing in the existing memory detection scheme, the embodiment of the invention provides a new memory out-of-range detection scheme. The following describes the technical solution of the present invention and how to solve the above technical problems with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present invention will be described below with reference to the accompanying drawings.
Fig. 1 shows a schematic flow chart of a memory boundary crossing detection method provided in an embodiment of the present invention, where the method is used for detecting a memory boundary crossing of memory spaces to be detected, where each memory space to be detected stores a read-only area identifier, and as shown in fig. 1, the method may include the following steps:
step S110, when at least one to-be-detected memory space meets the detection condition, based on the space identifier of the to-be-detected memory space meeting the detection condition, a memory out-of-range detection function is called.
The detection condition may be configured based on actual requirements, for example, the detection condition is configured to detect the memory space to be detected once every set time interval, and detect whether the memory space to be detected is out of bounds at every set time interval.
It should be noted that, in practical applications, for each memory space to be detected, the detection conditions corresponding to different memory spaces to be detected may be the same or different.
Step S120, the memory out-of-range detection function detects the identification status of the read-only area identifier of the target memory space corresponding to the space identifier according to the space identifier.
Specifically, each memory space to be detected has a corresponding space identifier, the identifier may be an actual memory address of the memory space or may be a number, each memory address corresponds to a unique memory space, and the corresponding memory space can be matched through the space identifier.
The memory boundary crossing detection function is used for detecting whether the memory boundary crossing occurs in each memory space to be detected, and for each memory space meeting the detection condition, the memory boundary crossing detection function can be called to carry out memory boundary crossing detection. That is, all the memory spaces to be detected correspond to the same memory boundary crossing detection function. When the memory cross-border detection needs to be carried out on the memory space to be detected meeting the detection condition, the memory cross-border detection function can be called, and the function carries out the memory cross-border detection on the memory space based on the space identification of the memory space.
In the method of the present invention, each memory space to be detected stores a read-only region identifier, and the read-only region identifier may be data which is irrelevant to data stored in the memory space and has no influence on reading and writing of the data stored in the memory space. For a memory space to be detected, whether the identification of the read-only area identification of the memory space represents whether the data in the memory space changes, that is, whether the memory space is out of bounds by writing.
It can be understood that if a plurality of memory spaces to be detected satisfy the detection condition at the same time, the memory cross-border detection can be performed on the plurality of memory spaces to be detected at the same time.
Step S130, determining whether the target memory space is out of range according to the identification status of the read-only area identifier.
In the embodiment of the invention, when at least one memory space to be detected meets the detection condition, based on the space identifier of the memory space to be detected meeting the detection condition, a memory boundary crossing detection function can be called, the memory boundary crossing detection function can detect the identifier state of the read-only area identifier in the target memory space corresponding to the space identifier based on the space identifier, and the identifier state is used for determining whether the memory boundary crossing occurs in the target memory space, in the scheme, because the read-only area identifiers are stored in the memory spaces to be detected, when the memory space to be detected needs to be detected, the read-only area identifier of the target memory space corresponding to the space identifier is detected by the called memory boundary crossing detection function based on the space identifier of the memory space to be detected, so that the detection of the memory space to be detected can be realized, other extra settings are not needed, and the method is simple to implement and high in applicability.
In an embodiment of the present invention, the method may further include:
constructing a base class of all memory spaces to be detected, wherein member variables of the base class comprise member variables corresponding to all the memory spaces to be detected, and read-only marks are stored in memory areas corresponding to the designated member variables of the memory spaces to be detected;
and constructing a memory boundary crossing detection function, wherein the memory boundary crossing detection function inherits the base class.
Specifically, the memory out-of-range detection function inherits from the base class corresponding to all the memory spaces to be detected, and because the member variables of the base class include the member variables corresponding to each memory space to be detected, when detecting whether the memory space to be detected is out-of-range based on the memory out-of-range detection function, based on the inherited characteristics, when the memory out-of-range detection is required, the memory out-of-range detection function can detect the read-only space identifier in the memory area corresponding to the designated member variable of the memory space to be detected corresponding to the space identifier based on the space identifier of the memory space to be detected, and determine whether the memory space to be detected is out-of-range based on the detection result.
In the scheme of the invention, the method can further comprise the following steps:
and when a new memory space exists and the memory out-of-range detection is required, adding member variables of the new memory space into the base class.
Specifically, based on the inherited characteristics, when a new memory space needs to be detected, the member variables of the new memory space can be stored in the base class, and the memory out-of-range detection function can perform memory out-of-range detection on the memory space (new memory space) corresponding to the new member variables based on the new member variables added in the base class, without rewriting the memory out-of-range detection function for the new memory space.
In the embodiment of the invention, a member variable is designated as a first member variable;
in step S120, detecting the identifier status of the read-only area identifier of the target memory space corresponding to the space identifier may include:
and detecting the identification state of the read-only area identification in the memory area corresponding to the first member variable in the target memory space corresponding to the space identification.
Specifically, the memory areas corresponding to the member variables in the memory space to be detected are continuous, if a memory area corresponding to one member variable in the memory space to be detected is out of range, the corresponding memory space to be detected is also out of range, in order to reduce data processing amount, the read-only area identifier stored in the memory space to be detected may be stored only in the memory area corresponding to the first member variable, and when performing the memory out-of-range detection on the memory space to be detected, it may be detected only whether the memory area corresponding to the first member variable in the memory space to be detected is out of range, that is, it is determined whether the target memory area is out of range by detecting the identifier state of the read-only area identifier in the memory area corresponding to the first member variable in the target memory space.
In the embodiment of the invention, the read-only area mark is a set character string, and the mark state comprises changed and unchanged states;
determining whether the memory boundary crossing occurs in the target memory space according to the identification state of the read-only area identifier may include:
if the character string changes, the target memory space is out of range;
if the character string is not changed, the target memory space is not out of range of the memory.
Specifically, the read-only region identifier may be a set character string, and whether the memory boundary crossing occurs in the target memory space may be determined based on the identifier state of the character string. The character string change means that the character string corresponding to the detection is not consistent with the character string pre-stored in the target memory space, for example, the length of the character string changes, and the character string non-change means that the character string corresponding to the detection is completely consistent with the character string pre-stored in the target memory space.
In an embodiment of the present invention, the character string is a devil's number.
Specifically, the devil number is a number, a character string, or the like having no specific meaning in the code, and does not affect other data stored in the memory space to be detected.
In the embodiment of the invention, the memory space to be detected is a read-only space.
Specifically, the memory space to be detected is a read-only space, and no matter any operation wanting to write data into the memory space to be detected, the memory space is subjected to memory out-of-bounds.
In an embodiment of the present invention, the method may further include:
and storing the space identification of the memory space to be detected to a specified storage position.
Specifically, in order to facilitate management of each memory space to be detected, the space identifier of each memory space to be detected may be stored in an assigned storage location, and each space identifier and the corresponding memory space to be detected are managed by the assigned storage location, so that when a new memory space needs to be detected, the space identifier of the new memory space may also be stored in the assigned storage location.
In the embodiment of the present invention, when the memory cross-border occurs in the memory space to be detected, the method may further include:
and generating memory boundary crossing reminding information based on the space identification of the memory space where the memory boundary crossing occurs, and providing the memory boundary crossing reminding information for a user.
Specifically, if the memory space to be detected, which is detected by the memory out-of-range detection function, has an out-of-range memory, the memory out-of-range reminding information can be generated based on the space identifier of the memory space in which the out-of-range memory occurs, and the user is reminded of the out-of-range memory through the memory out-of-range reminding information, so that more serious consequences are avoided.
As an example, if the memory space in which the memory boundary crossing occurs is the target memory space, the present solution is further described with reference to a memory boundary crossing detection method shown in fig. 2:
the method is used for detecting the memory out-of-range of the memory spaces to be detected, wherein each memory space to be detected stores a read-only area identifier, and as shown in fig. 2, the method can include the following steps:
step S210, when at least one to-be-detected memory space meets the detection condition, based on the space identifier of the to-be-detected memory space meeting the detection condition, a memory out-of-range detection function is called.
In step S220, the memory out-of-range detection function detects the identification status of the read-only region identifier of the target memory space corresponding to the space identifier according to the space identifier.
In step S230, it is determined whether the memory out-of-range occurs in the target memory space according to the identification status of the read-only area identifier.
In step S240, when the memory cross-border occurs in the target memory space, the memory cross-border reminding information is generated based on the space identifier of the target memory space, and the memory cross-border reminding information is provided to the user.
The above steps S210 to S230 are the same as the above steps S110 to S130, and are not described herein again. And when the memory cross-border occurs in the target memory space, generating memory cross-border reminding information based on the space identifier of the target memory space, and reminding the user of the memory cross-border by the reminding information so as to avoid more serious consequences. In an embodiment of the present invention, the method may further include:
and storing the space related information of the memory space to be detected and the space identification in a specified storage position in an associated manner.
The space-related information refers to information related to the memory space to be detected, and the specific condition of the memory space to be detected can be known more through the information, for example, which memory space is specific, what data is mainly stored in the memory space, what condition is stored in the memory space, what time the memory is out of range, and the like.
Generating the memory out-of-range reminding information based on the space identifier of the memory space where the memory out-of-range occurs, may include:
based on the space identification of the memory space where the memory boundary crossing occurs, acquiring space related information of the memory space where the memory boundary crossing occurs from the specified storage position;
and generating memory out-of-range reminding information based on the space identification of the memory space in which the memory out-of-range occurs and the corresponding space related information. Specifically, since the specific situation of the memory space to be detected can be known more through the space-related information, when the memory space to be detected is out of range, the memory out-of-range reminding information can be generated based on the space identifier of the memory space in which the memory out-of-range occurs and the space-related information, so that the memory out-of-range reminding information can reflect the specific situation of the memory space in which the memory out-of-range occurs more comprehensively and specifically, and a user (for example, research and development technician) can be facilitated to quickly locate the reason for the out-of-range.
As an example, if the memory space in which the memory boundary crossing occurs is the target memory space, the present solution is further described with reference to a memory boundary crossing detection method shown in fig. 3:
the method is used for detecting the memory out-of-range of the memory spaces to be detected, wherein each memory space to be detected stores a read-only area identifier, and as shown in fig. 3, the method may include the following steps:
step S310, when at least one to-be-detected memory space meets the detection condition, based on the space identifier of the to-be-detected memory space meeting the detection condition, a memory out-of-range detection function is called.
In step S320, the memory out-of-range detection function detects the identification status of the read-only region identifier of the target memory space corresponding to the space identifier according to the space identifier.
Step S330, determining whether the memory boundary crossing occurs in the target memory space according to the identification status of the read-only area identifier.
Step S340, when the memory cross border occurs in the target memory space, based on the space identification of the target memory space, obtaining the space related information of the target memory space from the designated storage position;
step S350, generating memory boundary crossing reminding information based on the space identification of the target memory space and the corresponding space related information, and providing the memory boundary crossing reminding information for the user
The above steps S310 to S330 are the same as the above steps S110 to S130, and are not described herein again. The space identification and the space related information of the target memory space are stored in the designated storage location, if the target memory space is out of range, the space related information of the target memory space can be matched from the space identification based on the target memory space in the designated storage location, and the space related information is the information related to the target memory space.
To further enhance the understanding of the present solution, the following further describes the present solution with reference to a specific application scenario in fig. 4:
the shared memory is widely used in a game background server, the server generally applies for a continuous shared memory, and each game user of the game can continuously allocate corresponding memory space from the shared memory, so that the game user can perform corresponding game operation based on the allocated memory. However, if the memory allocated by each game user is out of range, the game is directly crashed, and in this case, the out of range of the memory is not easy to detect.
Based on the above situation, according to the method of the present disclosure, when each game user logs in, a memory space is allocated to each game user, a space identifier (for example, a memory address) and space related information corresponding to each memory space are stored in a designated storage location (for example, a memstick data module shown in fig. 2), and a read-only area identifier (for example, a devil's number) is stored in each memory space, and each memory space can be used as a memory space to be detected.
As shown in fig. 4, the CPlayer represents game users, and for the to-be-detected memory space corresponding to each game user, a base class for constructing all the to-be-detected memory spaces is first constructed, and the member variables of the base class include member variables corresponding to each to-be-detected memory space; as shown in fig. 4, the base class is a CMemCheckElement class, the member variables of the memory space to be checked are CPlayerBase, CPlayerBox and CPlayerTeam, different data of the game user may be stored in the corresponding memory areas by the different member variables, for example, the CPlayerBase member variables store basic data of the game user in the corresponding memory areas, such as information of a character name and a character skill, the CPlayerBox member variables store game related data of the game user in the corresponding memory areas, such as information of a game scene and game equipment, and the CPlayerTeam member variables store team information of the game user in the corresponding memory areas, such as information of a team member.
Since the member variables of the base class include member variables corresponding to each memory space to be detected, and the member variables of the memory space to be detected include CPlayerBase, CPlayerBox, and CPlayerTeam, the member variables of the base class may also include CPlayerBase, CPlayerBox, and CPlayerTeam.
The first member variable of the space to be detected is CPlayerBase, and since the corresponding memory areas of the member variables in the memory space to be detected are continuous, that is, the memory areas corresponding to CPlayerBase, CPlayerBox and CPlayerTeam are continuous, the occurrence of memory out-of-bounds in the memory area corresponding to any one of the three member variables can indicate the occurrence of memory out-of-bounds in the memory space to be detected, so that in order to simplify the algorithm, a read-only area identifier can be stored in the memory area corresponding to the first member variable in the memory space to be detected. Therefore, when it is required to detect whether the memory space to be detected is out of bounds, it is only required to detect whether the memory area corresponding to the first member variable of the memory space to be detected in the memory space to be detected is out of bounds.
Based on the detection requirement of the memory out-of-bounds, a memory out-of-bounds detection function (for example, Check () function shown in fig. 4) is constructed, and the memory out-of-bounds detection function is registered in the cservicememchck module shown in fig. 4, wherein the memory out-of-bounds detection function inherits from base classes corresponding to all memory spaces to be detected, the cservicememchck module provides a cservicememchck interface and a Check interface, the cservicememchck interface is used for receiving a detection request (the detection request can be a request generated inside a corresponding system when the memory space to be detected meets the detection condition), the request can include a space identifier of the memory space to be detected, the Check interface is used for calling the memory out-of bounds detection function, when the memory space to be detected is detected based on the memory out-of-bounds detection function, based on the inherited characteristic, when the memory out-of-bounds detection is required, the memory out-of-bounds detection function can be based on the space identifier of the memory to be detected, the read-only space identifier in the memory area corresponding to the designated member variable (the first member variable in this example) of the memory space to be detected corresponding to the space identifier is detected, and whether the memory space to be detected is out of range is determined based on the detection result.
Based on the description of the above scheme, the specific implementation process of the memory boundary crossing detection based on the game scene is as follows:
the memory space corresponding to each game user is used as a memory space to be detected, for each memory space to be detected, the member variable of each memory space to be detected includes CPlayerBase, CPlayerBox and CPlayerTeam, the first member variable is CPlayerBase, and a read-only area identifier (in this example, the read-only area identifier may be a devil number) is stored in a storage area corresponding to the CPlayerBase which is the first member variable of each memory space to be detected.
When the memory cross-border detection needs to be performed on the memory space corresponding to a certain game user, that is, when the memory space to be detected meets the detection condition (for example, if the detection condition is every set time interval, the meeting of the detection condition means reaching the set time interval), receiving a detection request through a CServiceMemCheck interface (the request refers to a request generated inside a system when a detection condition is met), the request comprises a space identifier of the memory space to be detected, a target memory space corresponding to the space identifier is determined from the MemCheckData module based on the space identifier, the target memory space can be a memory space corresponding to a game user, because the member variables of the base class corresponding to the target memory space include the member variables of the target memory space, and the memory boundary crossing detection function Check () inherits the base class, and a memory boundary crossing detection function Check () inherited from the base class can be called through a Check interface.
Because the member variables of the base class include the member variables of the target memory space, the identification state of the read-only area identifier stored in the memory area corresponding to the first member variable CPlayerBase of the target memory space can be detected through the memory boundary crossing detection function Check (), if the identification state of the read-only area identifier is changed, the target memory space (the memory space corresponding to the game user) is indicated to be subjected to memory boundary crossing, otherwise, if the identification state of the read-only area identifier is not changed, the target memory space is indicated to be not subjected to memory boundary crossing.
By the detection mode, the memory boundary crossing detection function Check () is inherited to the base class CMemCheckElement, when the target memory space is determined, the target memory space to be detected can be determined only based on the space identification, the memory boundary crossing detection function can correspondingly detect whether the target memory space has the memory boundary crossing, and codes do not need to be rewritten once, so that the scheme can be applied to various application scenes needing the memory boundary crossing detection.
When the memory out-of-range detection scheme is used for detection, whether the read-only region identifier in the memory space to be detected changes or not can be identified based on a returned identifier (e.g., the bool shown in fig. 4), for example, the bool is 1, which indicates that the read-only region identifier changes, that is, the memory out-of-range occurs in the memory space to be detected, and the bool is 0, which indicates that the read-only region identifier does not change, that is, the memory out-of-range does not occur in the memory space to be detected. If the detected memory space to be detected is out of range, the space related information of the memory space can be determined from the MemCheckData module based on the space identification of the memory space in which the memory out of range occurs, the memory out-of-range reminding information is generated based on the space identification and the space related information, and the memory out-of-range reminding information is provided for research and development technicians, so that the research and development technicians can determine the reason of the memory out of range based on the reminding information. Based on the same principle as the method shown in fig. 1, the embodiment of the present invention further provides a device 20, which is used for detecting the memory out-of-range of the memory spaces to be detected, wherein each memory space to be detected stores a read-only area identifier; as shown in fig. 5, the apparatus 20 may include: a target memory space determination module 210, an identification state detection module 220, and a memory out-of-range detection module 230, wherein:
the target memory space determining module 210 is configured to, when at least one to-be-detected memory space meets a detection condition, call a memory out-of-range detection function based on a space identifier of the to-be-detected memory space meeting the detection condition;
an identifier state detection module 220, configured to detect, by the memory out-of-range detection function, an identifier state of a read-only area identifier of the target memory space corresponding to the space identifier according to the space identifier;
the memory out-of-range detection module 230 is configured to determine whether a memory out-of-range occurs in the target memory space according to the identifier status of the read-only area identifier.
In the embodiment of the invention, when at least one memory space to be detected meets the detection condition, based on the space identifier of the memory space to be detected meeting the detection condition, a memory boundary crossing detection function can be called, the memory boundary crossing detection function can detect the identifier state of the read-only area identifier in the target memory space corresponding to the space identifier based on the space identifier, and the identifier state is used for determining whether the memory boundary crossing occurs in the target memory space, in the scheme, because the read-only area identifiers are stored in the memory spaces to be detected, when the memory space to be detected needs to be detected, the read-only area identifier of the target memory space corresponding to the space identifier is detected by the called memory boundary crossing detection function based on the space identifier of the memory space to be detected, so that the detection of the memory space to be detected can be realized, other extra settings are not needed, and the method is simple to implement and high in applicability.
Optionally, the space identifier is a memory address.
Optionally, the apparatus further comprises:
the base class and detection function construction module is used for constructing base classes of all the memory spaces to be detected, member variables of the base classes comprise member variables corresponding to all the memory spaces to be detected, and the read-only marks are stored in memory areas corresponding to the designated member variables of the memory spaces to be detected; and constructing a memory boundary crossing detection function, wherein the memory boundary crossing detection function inherits the base class.
Optionally, the apparatus further comprises:
and the member variable adding module is used for adding the member variables of the new memory space into the base class when the new memory space exists and the memory out-of-range detection is required.
Optionally, designating the member variable as a first member variable;
the identifier state detection module, when detecting the identifier state of the read-only area identifier of the target memory space corresponding to the space identifier, is specifically configured to:
and detecting the identification state of the read-only area identification in the memory area corresponding to the first member variable in the target memory space corresponding to the space identification.
Optionally, the apparatus further comprises:
and the storage module is used for storing the space identifier of the memory space to be detected to the appointed storage position.
Optionally, the apparatus further comprises:
and the memory out-of-range reminding information generating module is used for generating memory out-of-range reminding information based on the space identification of the memory space in which the memory out-of-range occurs when the memory out-of-range occurs in the memory space to be detected, and providing the memory out-of-range reminding information for a user.
Optionally, the storage module is further configured to store the space-related information of the memory space to be detected and the space identifier in an associated manner to the specified storage location;
the memory out-of-range prompting information generating module is specifically configured to, when generating the memory out-of-range prompting information based on the space identifier of the memory space where the memory out-of-range occurs:
based on the space identification of the memory space where the memory boundary crossing occurs, acquiring space related information of the memory space where the memory boundary crossing occurs from the specified storage position;
and generating memory out-of-range reminding information based on the space identification of the memory space in which the memory out-of-range occurs and the corresponding space related information.
Optionally, the read-only area identifier is a set character string, and the identifier state includes changed and unchanged;
the memory boundary crossing detection module is specifically configured to, when determining whether the memory boundary crossing occurs in the target memory space according to the identifier state of the read-only area identifier:
if the character string changes, the target memory space is out of range;
if the character string is not changed, the target memory space is not out of range of the memory.
Optionally, the character string is a devil's number.
Optionally, the memory space to be detected is a read-only space.
The memory boundary crossing detection device of the embodiment of the present invention may execute the memory boundary crossing detection method shown in fig. 1, and the implementation principles thereof are similar, the actions executed by each module in the memory boundary crossing detection device of the embodiments of the present invention correspond to the steps in the memory boundary crossing detection method of the embodiments of the present invention, and the detailed functional description of each module of the memory boundary crossing detection device may specifically refer to the description in the corresponding memory boundary crossing detection method shown in the foregoing, and will not be described again here.
Based on the same principle as the method in the embodiment of the present invention, the present invention provides an electronic device including a processor and a memory; a memory for storing operating instructions; a processor for executing the method as shown in any of the embodiments of the method of the present invention by calling an operation instruction.
Based on the same principles as the method in the embodiments of the invention, the invention provides a computer-readable storage medium storing at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by a processor to implement the method as shown in any one of the embodiments of the data processing method of the invention.
In an embodiment of the present invention, as shown in fig. 6, a schematic structural diagram of an electronic device 50 (e.g., a terminal device or a server implementing the method shown in fig. 1) suitable for implementing an embodiment of the present invention is shown. The electronic devices in the embodiments of the present invention may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., car navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 6, electronic device 50 may include a processing means (e.g., central processing unit, graphics processor, etc.) 501 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the electronic apparatus 30 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
Generally, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 507 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; storage devices 508 including, for example, magnetic tape, hard disk, etc.; and a communication device 509. The communication means 509 may allow the electronic device 50 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device 50 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present invention, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the invention include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or installed from the storage means 508, or installed from the ROM 502. The computer program performs the above-described functions defined in the method of the embodiment of the present invention when executed by the processing apparatus 501.
It should be noted that the computer readable medium of the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to perform the methods shown in the method embodiments; alternatively, the computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to perform the method shown in the above method embodiment.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present invention may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The foregoing description is only exemplary of the preferred embodiments of the invention and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents is encompassed without departing from the spirit of the disclosure. For example, the above features and (but not limited to) features having similar functions disclosed in the present invention are mutually replaced to form the technical solution.

Claims (12)

1. A memory out-of-range detection method is characterized in that the method is used for detecting the memory out-of-range of memory spaces to be detected, wherein a read-only area mark is stored in each memory space to be detected; the method comprises the following steps:
when at least one memory space to be detected meets the detection condition, calling a memory out-of-range detection function based on the space identification of the memory space to be detected meeting the detection condition; the memory spaces to be detected are constructed with a base class, and the member variables of the base class comprise member variables corresponding to the memory spaces to be detected; the read-only area identification is stored in a memory area corresponding to a first member variable of the memory space to be detected; the memory out-of-range detection function inherits the base class and carries out memory out-of-range detection on a memory space corresponding to the member variable included in the base class based on the base class; when a new memory space exists and memory out-of-range detection is required, adding member variables of the new memory space into the base class;
detecting the identification state of the read-only area identification of the target memory space corresponding to the space identification by the memory out-of-range detection function according to the space identification, wherein the detection comprises the following steps: detecting the identification state of a read-only area identification in a memory area corresponding to a first member variable in a target memory space corresponding to a space identification; the memory areas corresponding to the member variables in the memory space to be detected are continuous;
and determining whether the target memory space is out of range of the memory or not according to the identification state of the read-only area identification.
2. The method of claim 1, wherein the spatial indication is a memory address.
3. The method of claim 1, further comprising:
constructing base classes of all memory spaces to be detected;
and constructing the memory out-of-range detection function.
4. The method according to any one of claims 1 to 3, further comprising:
and storing the space identification of the memory space to be detected to a specified storage position.
5. The method according to any one of claims 1 to 3, wherein when a memory violation occurs in the memory space to be detected, the method further comprises:
and generating memory boundary crossing reminding information based on the space identification of the memory space where the memory boundary crossing occurs, and providing the memory boundary crossing reminding information for a user.
6. The method of claim 5, further comprising:
storing the space related information of the memory space to be detected and the space identification in a specified storage position in an associated manner;
the generating of the memory out-of-range reminding information based on the space identification of the memory space where the memory out-of-range occurs comprises:
based on the space identification of the memory space with the memory boundary crossing, acquiring space related information of the memory space with the memory boundary crossing from the specified storage position;
and generating the memory out-of-range reminding information based on the space identification of the memory space in which the memory out-of-range occurs and the corresponding space related information.
7. The method according to any one of claims 1 to 3, wherein the identification state comprises changed and unchanged;
determining whether the target memory space is out of range according to the identification state of the read-only area identification, including:
if the character string changes, the target memory space is out of range of the memory;
and if the character string is not changed, the target memory space is not out of memory.
8. The method of claim 7, wherein the string of characters is a magic number.
9. The method according to any one of claims 1 to 3, wherein the memory space to be detected is a read-only space.
10. A memory out-of-range detection device is characterized in that the device is used for detecting the memory out-of-range of memory spaces to be detected, wherein a read-only area mark is stored in each memory space to be detected; the device comprises:
the target memory space determining module is used for calling a memory out-of-range detection function based on the space identification of the memory space to be detected meeting the detection condition when at least one memory space to be detected meets the detection condition; the memory spaces to be detected are constructed with a base class, and the member variables of the base class comprise member variables corresponding to the memory spaces to be detected; the read-only area identification is stored in a memory area corresponding to a first member variable of the memory space to be detected; the memory out-of-range detection function inherits the base class and carries out memory out-of-range detection on a memory space corresponding to the member variable included in the base class based on the base class; when a new memory space exists and memory out-of-range detection is required, adding member variables of the new memory space into the base class;
the identification state detection module is configured to detect, by the memory out-of-range detection function, an identification state of a read-only area identifier of a target memory space corresponding to the space identifier according to the space identifier, and includes: detecting the identification state of a read-only area identification in a memory area corresponding to a first member variable in a target memory space corresponding to a space identification; the memory areas corresponding to the member variables in the memory space to be detected are continuous;
and the memory out-of-range detection module is used for determining whether the memory out-of-range occurs in the target memory space according to the identification state of the read-only area identification.
11. An electronic device, comprising:
a processor and a memory;
the memory is used for storing computer operation instructions;
the processor is used for executing the method of any one of claims 1 to 9 by calling the computer operation instruction.
12. A computer readable storage medium, characterized in that it stores at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by a processor to implement the method of any of claims 1 to 9.
CN201910950733.4A 2019-10-08 2019-10-08 Memory out-of-range detection method and device, electronic equipment and computer storage medium Active CN110674050B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910950733.4A CN110674050B (en) 2019-10-08 2019-10-08 Memory out-of-range detection method and device, electronic equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910950733.4A CN110674050B (en) 2019-10-08 2019-10-08 Memory out-of-range detection method and device, electronic equipment and computer storage medium

Publications (2)

Publication Number Publication Date
CN110674050A CN110674050A (en) 2020-01-10
CN110674050B true CN110674050B (en) 2022-04-19

Family

ID=69080910

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910950733.4A Active CN110674050B (en) 2019-10-08 2019-10-08 Memory out-of-range detection method and device, electronic equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN110674050B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112114964A (en) * 2020-08-17 2020-12-22 上海睿赛德电子科技有限公司 Application security kernel access method suitable for embedded system
CN115373964B (en) * 2022-10-24 2023-01-20 北京智芯微电子科技有限公司 Memory out-of-range detection method, device, equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101145129A (en) * 2007-07-18 2008-03-19 中兴通讯股份有限公司 Embedded system memory write-overflow detection method and system
CN101183331A (en) * 2007-12-12 2008-05-21 上海华为技术有限公司 Tasks stack overflow detection method, device and computer system thereof
CN107480045A (en) * 2017-07-05 2017-12-15 积成电子股份有限公司 The error-detection error-correction and trace tracking method of a kind of electric energy meter software
CN108388517A (en) * 2018-03-14 2018-08-10 深圳怡化电脑股份有限公司 A kind of internal-memory detection method, device, equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016183529A1 (en) * 2015-05-13 2016-11-17 Stensal Inc. Translating machine codes to store metadata and to propagate metadata for run time checking of programming errors
CN106095689B (en) * 2016-06-24 2019-02-12 北京奇虎科技有限公司 A kind of detection method and device of application memory leakage

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101145129A (en) * 2007-07-18 2008-03-19 中兴通讯股份有限公司 Embedded system memory write-overflow detection method and system
CN101183331A (en) * 2007-12-12 2008-05-21 上海华为技术有限公司 Tasks stack overflow detection method, device and computer system thereof
CN107480045A (en) * 2017-07-05 2017-12-15 积成电子股份有限公司 The error-detection error-correction and trace tracking method of a kind of electric energy meter software
CN108388517A (en) * 2018-03-14 2018-08-10 深圳怡化电脑股份有限公司 A kind of internal-memory detection method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
cppcheck源码分析;WuLiang;《https://www.slideshare.net/magicsky/cppcheck-9660535》;20150719;1-55 *

Also Published As

Publication number Publication date
CN110674050A (en) 2020-01-10

Similar Documents

Publication Publication Date Title
CN110502357B (en) Stack backtracking method, device, medium and equipment
CN110851139B (en) Method and device for checking codes and electronic equipment
CN113835992B (en) Memory leakage processing method and device, electronic equipment and computer storage medium
CN110287810B (en) Vehicle door motion detection method, device and computer readable storage medium
CN110674050B (en) Memory out-of-range detection method and device, electronic equipment and computer storage medium
CN104268472B (en) Reduction is by the method and apparatus of third party's dynamic base Modification growth function address
CN110673986A (en) Memory operation abnormity capturing method, device, terminal and storage medium
CN110362371B (en) View level control method, device and system, computer equipment and medium
CN109739582B (en) Function calling method and device, electronic equipment and computer readable storage medium
US10643252B2 (en) Banner display method of electronic device and electronic device thereof
CN111626990B (en) Target detection frame processing method and device and electronic equipment
CN107133169B (en) Application test packet generation method and generation device
CN113157439B (en) Resource statistics method, device and terminal
CN111857518A (en) Method and device for canceling image editing operation, electronic equipment and medium
CN109408387B (en) Page testing method and device
CN111309406A (en) Event processing method and device of application program and electronic equipment
CN111625326B (en) Task pipeline execution method and device and electronic equipment
CN111290812B (en) Display method, device, terminal and storage medium of application control
CN113656286A (en) Software testing method and device, electronic equipment and readable storage medium
CN110083283B (en) Method, device and system for managing information
CN111143089A (en) Method and device for calling third-party library dynamic lifting authority by application program
CN111310175A (en) iOS application safety monitoring and protecting method and device based on plug-in
CN111124627A (en) Method, device, terminal and storage medium for determining application program caller
CN110245086B (en) Application program stability testing method, device and equipment
CN113448550B (en) Method and device for realizing collection management of classes, electronic equipment and computer medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40018308

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant