CN114090384A - Zombie object attribution method and device - Google Patents

Zombie object attribution method and device Download PDF

Info

Publication number
CN114090384A
CN114090384A CN202111402742.3A CN202111402742A CN114090384A CN 114090384 A CN114090384 A CN 114090384A CN 202111402742 A CN202111402742 A CN 202111402742A CN 114090384 A CN114090384 A CN 114090384A
Authority
CN
China
Prior art keywords
zombie
release information
instance
target
release
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.)
Pending
Application number
CN202111402742.3A
Other languages
Chinese (zh)
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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202111402742.3A priority Critical patent/CN114090384A/en
Publication of CN114090384A publication Critical patent/CN114090384A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3037Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a memory, e.g. virtual memory, cache
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The method comprises the steps of firstly responding to a release function call aiming at an example object, and determining whether the example object is an object to be monitored; then, under the condition that the instance object is an object to be monitored, recording release information of the instance object; then, under the condition that the zombie object is detected, searching target release information of a target instance object corresponding to the zombie object from the recorded release information; wherein, the zombie object memory has accessible instance objects, and the memory corresponding to the zombie object is released; and finally, under the condition that the target release information is found, determining the generation reason of the zombie object based on the target release information. According to the embodiment of the disclosure, the release information of the instance object is recorded, so that when the zombie object is detected, the generation reason of the zombie object is determined by using the recorded release information, and attribution of the zombie object is realized.

Description

Zombie object attribution method and device
Technical Field
The disclosure relates to the technical field of computers, in particular to a zombie object attribution method and device.
Background
The zombie object is a common abnormal situation in program operation, and is essentially an accessible instance object existing in a memory, but the memory of the instance object is recycled and released, and when the memory of one instance object is released, the instance object becomes the zombie object. The wild pointer is a pointer pointing to the zombie object.
Generally, a program can only detect the existence of a zombie object, and a user can only know that a certain object is the zombie object, but does not know the reason of the zombie object, so that the restoration of the application program is not facilitated.
Disclosure of Invention
The embodiment of the disclosure at least provides a zombie object attribution method and device.
In a first aspect, an embodiment of the present disclosure provides a zombie object attribution method, including:
determining whether an instance object is an object to be monitored in response to a release function call for the instance object;
under the condition that the example object is an object to be monitored, recording release information of the example object;
under the condition that a zombie object is detected, searching target release information of a target instance object corresponding to the zombie object from the recorded release information; wherein, the zombie object memory has accessible instance objects, and the memory corresponding to the zombie object is released;
and under the condition that the target release information is found, determining the generation reason of the zombie object based on the target release information.
In an optional implementation manner, the recording release information of the instance object includes:
and recording the release information of the instance object in a stack form.
In an optional embodiment, the method further comprises:
determining at least one possible release opportunity of the target instance object based on the logic code corresponding to the target instance object under the condition that the target release information is not found;
determining a causation of the zombie subject based on the likely release timing.
In an optional embodiment, the method further comprises:
and under the condition that at least one optional release opportunity of the target instance object cannot be determined, setting the target instance object as an object to be detected, so that the release information of the target instance object is recorded when the release function call for the target instance object is monitored next time.
In an optional implementation manner, in the case that the instance object is an object to be monitored, the recording release information of the instance object includes:
and under the condition that the instance object is the object to be monitored, if the occupied storage space of the currently recorded release information is less than a preset threshold value, recording the release information of the instance object.
In an alternative embodiment, the instance object is an object released by a main thread or a sub-thread of the iOS system.
In an optional embodiment, the method further comprises:
and deleting the stored release information of the target instance object corresponding to the zombie object when the zombie object is detected to be released.
In a second aspect, an embodiment of the present disclosure further provides a zombie object attribution device, including:
the response module is used for responding to the release function call aiming at the example object and determining whether the example object is an object to be monitored;
the recording module is used for recording the release information of the instance object under the condition that the instance object is an object to be monitored;
the searching module is used for searching target release information of a target instance object corresponding to the zombie object from the recorded release information under the condition that the zombie object is detected; wherein, the zombie object memory has accessible instance objects, and the memory corresponding to the zombie object is released;
and the attribution module is used for determining the generation reason of the zombie object based on the target release information under the condition that the target release information is found.
In an optional implementation manner, when recording the release information of the instance object, the recording module is configured to:
and recording the release information of the instance object in a stack form.
In an optional embodiment, the attribution module is further configured to:
determining at least one possible release opportunity of the target instance object based on the logic code corresponding to the target instance object under the condition that the target release information is not found;
determining a reason for generation of the zombie subject based on the likely release timing.
In an optional embodiment, the apparatus further includes a setting module configured to:
and under the condition that at least one optional release opportunity of the target instance object cannot be determined, setting the target instance object as an object to be detected, so that the release information of the target instance object is recorded when the release function call for the target instance object is monitored next time.
In an optional implementation manner, the recording module is specifically configured to:
and under the condition that the instance object is the object to be monitored, if the occupied storage space of the currently recorded release information is less than a preset threshold value, recording the release information of the instance object.
In an alternative embodiment, the instance object is an object released by a main thread or a sub-thread of the iOS system.
In an optional embodiment, the recording module is further configured to:
and when the fact that the zombie object is released is detected, deleting the stored release information of the target instance object corresponding to the zombie object.
In a third aspect, an embodiment of the present disclosure further provides an electronic device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the electronic device is running, the machine-readable instructions when executed by the processor performing the steps of the first aspect described above, or any possible implementation of the first aspect.
In a fourth aspect, this disclosed embodiment also provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps in the first aspect or any one of the possible implementation manners of the first aspect.
According to the zombie object attribution method and the zombie object attribution device, whether an example object is an object to be monitored or not is determined in response to a release function call aiming at the example object; then, under the condition that the instance object is an object to be monitored, recording release information of the instance object; then, under the condition that the zombie object is detected, searching target release information of a target instance object corresponding to the zombie object from the recorded release information; wherein, the zombie object memory has accessible instance objects, and the memory corresponding to the zombie object is released; and finally, under the condition that the target release information is found, determining the generation reason of the zombie object based on the target release information. According to the embodiment of the disclosure, the release information of the instance object is recorded, so that when the zombie object is detected, the generation reason of the zombie object is determined by using the recorded release information, and attribution of the zombie object is realized.
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly described below, and the drawings herein incorporated in and forming a part of the specification illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the technical solutions of the present disclosure. It is to be understood that the following drawings depict only certain embodiments of the disclosure and are therefore not to be considered limiting of its scope, for those skilled in the art to which the disclosure pertains without the benefit of the inventive faculty, and that additional related drawings may be derived therefrom.
FIG. 1 illustrates a flow chart of a zombie object attribution method provided by an embodiment of the present disclosure;
FIG. 2 illustrates a flow chart of another zombie object attribution method provided by embodiments of the present disclosure;
fig. 3 is a schematic diagram illustrating a zombie object attribution apparatus provided by an embodiment of the present disclosure;
fig. 4 shows a schematic diagram of an electronic device provided by an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, not all of the embodiments. The components of the embodiments of the present disclosure, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure, presented in the figures, is not intended to limit the scope of the claimed disclosure, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the disclosure without making creative efforts, shall fall within the protection scope of the disclosure.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The term "and/or" herein merely describes an associative relationship, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
According to research, in the running state of the program, only detection of the zombie object is usually supported, namely, only the zombie object can be found, and the analysis of the formation reason of the zombie object is not supported, and the attribution scheme for the zombie object is usually determined by analyzing codes under an off-line scene, so that attribution of an on-line environment cannot be realized.
Based on the research, the present disclosure provides a zombie object attribution method, which enables the reason for generating a zombie object to be determined by using recorded release information when the zombie object is detected by recording the release information of the instance object, so as to realize attribution of the zombie object.
To facilitate understanding of the present embodiment, first, a corpse object attribution method disclosed in the embodiments of the present disclosure is described in detail, where an execution subject of the corpse object attribution method provided in the embodiments of the present disclosure is generally a computer device with certain computing power, and the computer device includes, for example: a terminal device or a server or other processing device. In some possible implementations, the zombie object attribution method may be implemented by way of a processor calling computer readable instructions stored in a memory.
Referring to fig. 1, a flowchart of a zombie object attribution method provided by the embodiment of the present disclosure is shown, the method includes steps S101 to S104, where:
s101, responding to a release function call aiming at an instance object, and determining whether the instance object is an object to be monitored.
In this step, the release function call may be monitored, and when it is detected that a release function call is triggered by an instance object, it may be determined whether the instance object is an object to be monitored, the object to be monitored may be an object preset by a user, and the user may set an instance object to which the zombie object is attributed as needed according to a requirement, and monitor a specific instance object.
The release function may be a dealloc method, and the dealloc method is a memory release function under the iOS platform and is used for releasing memory resources occupied by instance objects or classes.
In a possible implementation manner, it may be determined that the detected instance function is an object to be monitored, if so, the storage space occupation of the currently recorded release information may be determined, and if the storage space occupation is smaller than a preset threshold, the release information of the instance object is recorded.
For example, the release information of the current record may refer to the release information for the instance function, or may refer to all the release information for the global record.
Therefore, the storage space occupied by the release information can be kept within a certain range, and other problems caused by overhigh occupied storage space are prevented.
S102, recording the release information of the instance object under the condition that the instance object is the object to be monitored.
In this step, the release information of the instance object may be stored in a specific stack, where the stack is a data structure, the stored data items may be arranged in sequence, and the release information may be recorded in a stack form, and the stack may be a software stack in an internal memory or a hardware stack formed by registers.
The release information may include time for releasing the instance object, an object for calling a release function, a code segment to which the instance object belongs, and other information used for analyzing the cause of occurrence of the zombie object.
S103, under the condition that the zombie object is detected, searching target release information of a target instance object corresponding to the zombie object from the recorded release information; and the memory corresponding to the zombie object is released.
In the step, the zombie objects can be monitored simultaneously, and when the zombie objects are detected, release information corresponding to the zombie objects can be searched from a stack in which the release information is stored, so that target release information is obtained.
S104, under the condition that the target release information is found, determining the generation reason of the zombie object based on the target release information.
In this step, if the target release information is found, it may be determined, according to the found target release information, when, which process, and which code segment have performed the memory release, so as to determine the reason for generating the zombie object.
In some possible embodiments, the zombie object that may be detected is not a preset object to be detected, and therefore, release information of the target instance object corresponding to the zombie object is not recorded in the stack, and therefore, the target instance object is set as the object to be detected when at least one optional release timing of the target instance object is not determined, and thus, when the release function call for the target instance object is monitored next time, the release information of the target instance object is recorded, so that the generated zombie object can be attributed when the zombie object of the target instance object is generated.
In a possible implementation manner, the above scheme may be applied to an iOS system, and since the iOS system is provided with a main thread and a sub-thread, if release function calls of the main thread and the sub-thread are monitored simultaneously, a large amount of time for waiting for the sub-thread may be required for overall monitoring, so that instance objects of the main thread and the sub-thread may be monitored respectively, an object released by the main thread may be monitored separately, or an object released by the sub-thread may be monitored separately, thereby improving monitoring efficiency.
In a possible implementation manner, if it is detected that the zombie object is released, the stored release information of the target instance object corresponding to the zombie object can be screened out from the stack, so that the unnecessary information can be released, and the storage resource is saved.
According to the zombie object attribution method and the zombie object attribution device, whether an example object is an object to be monitored or not is determined in response to a release function call aiming at the example object; then, under the condition that the instance object is an object to be monitored, recording release information of the instance object; then, under the condition that the zombie object is detected, searching target release information of a target instance object corresponding to the zombie object from the recorded release information; the method comprises the following steps that an accessible instance object exists in a zombie object memory, and the memory corresponding to the zombie object is released; and finally, under the condition that the target release information is found, determining the generation reason of the zombie object based on the target release information. According to the embodiment of the disclosure, the release information of the instance object is recorded, so that when the zombie object is detected, the generation reason of the zombie object is determined by using the recorded release information, and attribution of the zombie object is realized.
Referring to fig. 2, another zombie object attribution method provided for the embodiment of the present disclosure is implemented by determining, when an object (i.e., the above-mentioned example object) is detected to be released, whether the object hits a class that needs attribution (i.e., whether the object is an object to be monitored), and whether a storage space occupied by a recorded release stack does not exceed a threshold value, if yes, recording release information of the object in the release stack, and continuing monitoring, and when a zombie object is detected to be triggered at a certain time, querying whether a release stack that records release information of the example object corresponding to the zombie object exists, and if yes, obtaining release information through the release stack of the zombie object, and further attributing the zombie object, so as to solve a problem of the zombie object; if no record exists, analyzing the application code in a offline analysis mode, and determining the code segment of the zoobie object, so as to find out the formation reason of the zoobie object; if the offline analysis mode fails to find the formation reason of the zoobie object, it may be determined whether the class corresponding to the object is configured as the class requiring attribution, if the class requiring attribution has been set, the process is directly ended, and if the class requiring attribution has not been set, the class requiring attribution is configured as the class requiring attribution, so as to implement attribution of the zoobie object by releasing the stack when the zombie object is triggered again.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
Based on the same inventive concept, the embodiment of the present disclosure further provides a zombie object attribution device corresponding to the zombie object attribution method, and as the principle of solving the problem of the device in the embodiment of the present disclosure is similar to the above-mentioned zombie object attribution method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and repeated details are not repeated.
Referring to fig. 3, a schematic view of a zombie subject attribution apparatus provided in an embodiment of the present disclosure is shown, the apparatus including:
a response module 310, configured to determine whether an instance object is an object to be monitored in response to a release function call for the instance object;
a recording module 320, configured to record release information of the instance object when the instance object is an object to be monitored;
the searching module 330 is configured to search, in a case where a zombie object is detected, target release information of a target instance object corresponding to the zombie object from the recorded release information; wherein, the zombie object memory has accessible instance objects, and the memory corresponding to the zombie object is released;
an attribution module 340, configured to determine, based on the target release information, a generation reason of the zombie object when the target release information is found.
In an optional implementation manner, when recording the release information of the instance object, the recording module 320 is configured to:
and recording the release information of the instance object in a stack form.
In an alternative embodiment, the attribution module 340 is further configured to:
determining at least one possible release opportunity of the target instance object based on the logic code corresponding to the target instance object under the condition that the target release information is not found;
determining a reason for generation of the zombie subject based on the likely release timing.
In an optional embodiment, the apparatus further comprises a setting module configured to:
and under the condition that at least one optional release opportunity of the target instance object cannot be determined, setting the target instance object as an object to be detected, so that the release information of the target instance object is recorded when the release function call for the target instance object is monitored next time.
In an optional implementation manner, the recording module 320 is specifically configured to:
and under the condition that the instance object is the object to be monitored, if the occupied storage space of the currently recorded release information is less than a preset threshold value, recording the release information of the instance object.
In an alternative embodiment, the instance object is an object released by a main thread or a sub-thread of the iOS system.
In an optional implementation, the recording module 320 is further configured to:
and deleting the stored release information of the target instance object corresponding to the zombie object when the zombie object is detected to be released.
According to the embodiment of the disclosure, the release information of the instance object is recorded, so that when the zombie object is detected, the generation reason of the zombie object is determined by using the recorded release information, and attribution of the zombie object is realized.
The description of the processing flow of each module in the device and the interaction flow between the modules may refer to the related description in the above method embodiments, and will not be described in detail here.
Corresponding to the zombie object attribution method in fig. 1, an embodiment of the present disclosure further provides an electronic device 400, and as shown in fig. 4, a schematic structural diagram of the electronic device 400 provided in the embodiment of the present disclosure includes:
a processor 41, a memory 42, and a bus 43; the memory 42 is used for storing execution instructions and includes a memory 421 and an external memory 422; the memory 421 is also referred to as an internal memory, and is used for temporarily storing the operation data in the processor 41 and the data exchanged with the external memory 422 such as a hard disk, the processor 41 exchanges data with the external memory 422 through the memory 421, and when the electronic device 400 operates, the processor 41 communicates with the memory 42 through the bus 43, so that the processor 41 executes the following instructions:
determining whether an instance object is an object to be monitored in response to a release function call for the instance object;
under the condition that the instance object is an object to be monitored, recording release information of the instance object;
under the condition that a zombie object is detected, searching target release information of a target instance object corresponding to the zombie object from the recorded release information; the method comprises the following steps that an accessible instance object exists in a zombie object memory, and the memory corresponding to the zombie object is released;
and under the condition that the target release information is found, determining the generation reason of the zombie object based on the target release information.
In an alternative embodiment, in the instructions executed by the processor 41, the recording the release information of the instance object includes:
and recording the release information of the instance object in a stack form.
In an optional embodiment, the processor 41 is further configured to:
determining at least one possible release opportunity of the target instance object based on the logic code corresponding to the target instance object under the condition that the target release information is not found;
determining a reason for generation of the zombie subject based on the likely release timing.
In an optional embodiment, the processor 41 is further configured to:
and under the condition that at least one optional release opportunity of the target instance object cannot be determined, setting the target instance object as an object to be detected, so that the release information of the target instance object is recorded when the release function call for the target instance object is monitored next time.
In an optional implementation manner, in the instructions executed by the processor 41, in the case that the instance object is an object to be monitored, the recording the release information of the instance object includes:
and under the condition that the instance object is the object to be monitored, if the occupied storage space of the currently recorded release information is less than a preset threshold value, recording the release information of the instance object.
In an alternative embodiment, the instance object is an object released by a main thread or a sub-thread of the iOS system.
In an optional embodiment, the processor 41 is further configured to:
and deleting the stored release information of the target instance object corresponding to the zombie object when the zombie object is detected to be released.
The embodiments of the present disclosure also provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, performs the steps of the zombie object attribution method in the above-mentioned method embodiments. The storage medium may be a volatile or non-volatile computer-readable storage medium.
The embodiments of the present disclosure also provide a computer program product, where the computer program product carries a program code, where instructions included in the program code may be used to execute the steps of the zombie object attributing method in the foregoing method embodiments, which may be referred to specifically for the foregoing method embodiments, and are not described herein again.
The computer program product may be implemented by hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and 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 of devices or units through some communication interfaces, 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 disclosure 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 functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are merely specific embodiments of the present disclosure, which are used for illustrating the technical solutions of the present disclosure and not for limiting the same, and the scope of the present disclosure is not limited thereto, and although the present disclosure is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive of the technical solutions described in the foregoing embodiments or equivalent technical features thereof within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present disclosure, and should be construed as being included therein. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (10)

1. A zombie subject attribution method, comprising:
determining whether an instance object is an object to be monitored in response to a release function call for the instance object;
under the condition that the example object is an object to be monitored, recording release information of the example object;
under the condition that a zombie object is detected, searching target release information of a target instance object corresponding to the zombie object from the recorded release information; wherein, the zombie object memory has accessible instance objects, and the memory corresponding to the zombie object is released;
and under the condition that the target release information is found, determining the generation reason of the zombie object based on the target release information.
2. The method of claim 1, wherein the recording the release information of the instance object comprises:
and recording the release information of the instance object in a stack form.
3. The method of claim 1, further comprising:
determining at least one possible release opportunity of the target instance object based on the logic code corresponding to the target instance object under the condition that the target release information is not found;
determining a reason for generation of the zombie subject based on the likely release timing.
4. The method of claim 3, further comprising:
and under the condition that at least one optional release opportunity of the target instance object cannot be determined, setting the target instance object as an object to be detected, so that the release information of the target instance object is recorded when the release function call for the target instance object is monitored next time.
5. The method according to claim 1, wherein the recording of the release information of the instance object in the case that the instance object is an object to be monitored comprises:
and under the condition that the instance object is the object to be monitored, if the occupied storage space of the currently recorded release information is less than a preset threshold value, recording the release information of the instance object.
6. The method of claim 1, wherein the instance object is a released object for a main thread or a sub-thread of the iOS system.
7. The method of claim 1, further comprising:
and deleting the stored release information of the target instance object corresponding to the zombie object when the zombie object is detected to be released.
8. A zombie subject attribution apparatus, comprising:
the response module is used for responding to a release function call aiming at the example object and determining whether the example object is an object to be monitored;
the recording module is used for recording the release information of the instance object under the condition that the instance object is an object to be monitored;
the searching module is used for searching target release information of a target instance object corresponding to the zombie object from the recorded release information under the condition that the zombie object is detected; wherein, the zombie object memory has accessible instance objects, and the memory corresponding to the zombie object is released;
and the attribution module is used for determining the generation reason of the zombie object based on the target release information under the condition that the target release information is found.
9. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating over the bus when the electronic device is operating, the machine-readable instructions when executed by the processor performing the steps of the zombie object attribution method of any one of claims 1-7.
10. A computer-readable storage medium, having stored thereon a computer program for performing, when being executed by a processor, the steps of the zombie object attribution method according to any one of claims 1 to 7.
CN202111402742.3A 2021-11-19 2021-11-19 Zombie object attribution method and device Pending CN114090384A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111402742.3A CN114090384A (en) 2021-11-19 2021-11-19 Zombie object attribution method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111402742.3A CN114090384A (en) 2021-11-19 2021-11-19 Zombie object attribution method and device

Publications (1)

Publication Number Publication Date
CN114090384A true CN114090384A (en) 2022-02-25

Family

ID=80304096

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111402742.3A Pending CN114090384A (en) 2021-11-19 2021-11-19 Zombie object attribution method and device

Country Status (1)

Country Link
CN (1) CN114090384A (en)

Similar Documents

Publication Publication Date Title
CN110099059B (en) Domain name identification method and device and storage medium
CN110213207B (en) Network security defense method and equipment based on log analysis
US10007788B2 (en) Method of modeling behavior pattern of instruction set in N-gram manner, computing device operating with the method, and program stored in storage medium to execute the method in computing device
CN112035314B (en) Memory leakage monitoring method and device and electronic equipment
CN110908880A (en) Embedded point code injection method, event reporting method and related equipment thereof
CN112817866A (en) Recording playback method, device, system, computer equipment and storage medium
CN110647472A (en) Breakdown information statistical method and device, computer equipment and storage medium
CN113110865A (en) Server hot updating method and device
CN112306833A (en) Application program crash statistical method and device, computer equipment and storage medium
CN111597553A (en) Process processing method, device, equipment and storage medium in virus searching and killing
CN114090384A (en) Zombie object attribution method and device
US20230367884A1 (en) Cyber attack scenario generation method and device
CN113132241B (en) ACL template dynamic configuration method and device
CN113010885B (en) Method and device for detecting kernel thread disguised with start address
CN108563578A (en) SDK compatibility detection method, device, equipment and readable storage medium storing program for executing
CN114722927A (en) Collapse clustering method and device, electronic equipment and storage medium
CN110928885A (en) Method and device for updating data of Mysql database to Es database
CN112596841B (en) Interface language switching method, device, equipment and storage medium
KR101735652B1 (en) Terminal apparatus and method for detecting cyber attack application thereby
CN111125193B (en) Method, device, equipment and storage medium for identifying abnormal multimedia comments
US11307920B2 (en) Automated crash recovery
CN114721800A (en) Audio thread processing method and device, computer equipment and storage medium
US20210397498A1 (en) Information processing apparatus, control method, and program
CN111931177B (en) Information processing method, apparatus, electronic device, and computer storage medium
CN109800099A (en) A kind of restoring method, storage medium and the terminal device of user's operation behavior

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: Tiktok vision (Beijing) Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.