CN110275791A - A kind of application exception processing method and processing device - Google Patents
A kind of application exception processing method and processing device Download PDFInfo
- Publication number
- CN110275791A CN110275791A CN201810209141.2A CN201810209141A CN110275791A CN 110275791 A CN110275791 A CN 110275791A CN 201810209141 A CN201810209141 A CN 201810209141A CN 110275791 A CN110275791 A CN 110275791A
- Authority
- CN
- China
- Prior art keywords
- function
- called function
- called
- address information
- exception
- 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.)
- Withdrawn
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0706—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/362—Software debugging
- G06F11/366—Software debugging using diagnostics
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the present invention provides a kind of application exception processing method and processing device.The described method includes: into the called function of application program to be processed, while the corresponding first function call stack address information of the called function is recorded in the first default global variable;The output abnormality signal if judgement knows that the called function occurs to be operating abnormally, and abnormality processing is carried out according to the abnormal signal;The first function call stack address information is extracted from the described first default global variable, and is exported after decoding to the first function call stack address information.Described device is for executing the above method.Method and device provided by the invention improves application exception treatment effeciency.
Description
Technical field
The present embodiments relate to field of computer technology more particularly to a kind of application exception processing method and dresses
It sets.
Background technique
The application program of software is often operating abnormally in the process of running, and operation exception can be to the stable operation of application program
It brings a great deal of trouble, therefore, the research of application exception processing method is had been to be concerned by more and more people.
Following three kinds are broadly divided into the case where application exception at present: (1) buffer overflow, null pointer access exception with
And remove zero abnormal problem;(2) some monitored object in global variable by memory overwriting or changes in some uncertain place
Write caused exception;(3) CPU occupation rate reaches 100%.It is different for buffer overflow, null pointer access under the conditions of the prior art
Often and zero abnormal problem is removed, currently used processing method is to generate core file by system, is then carried out by GDB
Tracking, or by printing a large amount of trace information, issue track is gradually carried out, or record in real time using special device
The register information of current call stack is monitored;For some monitored object in global variable by memory overwriting or rewriting
The problem of problem and CPU occupation rate reach 100% then usually by code gradually divided in the way of determine problem simultaneously
Carry out abnormality processing.But the former relies on the register information of call stack or the static information by symbol table, this method
To except zero exception and part null pointer access exception it is effective, but the case where buffer overflow can not be solved, and will be to sacrifice
Performance is cost, while the register information of stack is called using hardware, and cost is excessively high and for removing zero exception and null pointer
Access exception is invalid;And the latter is time-consuming and laborious in such a way that code is gradually divided and less effective.In conclusion existing
The efficiency of application exception processing method under technology conditional is generally lower.
It is therefore proposed that a kind of method come improve application exception be current industry it is urgently to be resolved need project.
Summary of the invention
For the defects in the prior art, the embodiment of the present invention provides a kind of application exception processing method and processing device.
On the one hand, the embodiment of the present invention provides a kind of application exception processing method, comprising:
Into the called function of application program to be processed, while described be called is recorded in the first default global variable
The corresponding first function call stack address information of function;
The output abnormality signal if judgement knows that the called function occurs to be operating abnormally, and according to the abnormal signal
Carry out abnormality processing;
The first function call stack address information is extracted from the described first default global variable, and to first letter
It is exported after number call stack address information decoding.
On the other hand, the embodiment of the present invention provides a kind of application exception processing unit, including recording unit, processing list
Member and output unit, in which:
Recording unit, for entering the called function of application program to be processed, while in the first default global variable
Record the corresponding first function call stack address information of the called function;
Processing unit, for the output abnormality signal if judgement knows that the called function occurs to be operating abnormally, and root
Abnormality processing is carried out according to the abnormal signal;
Output unit, for extracting the first function call stack address information from the described first default global variable,
And it is exported after being decoded to the first function call stack address information.
Another aspect, the embodiment of the present invention provide a kind of electronic equipment, including processor, memory and bus, in which:
The processor, the memory complete mutual communication by bus;
The processor can call the computer program in memory, the step of to execute the above method.
In another aspect, the embodiment of the present invention provides a kind of computer readable storage medium, it is stored thereon with computer program,
The step of above method is realized when the program is executed by processor.
Application exception processing method and processing device provided in an embodiment of the present invention, by entering application program to be processed
Called function when record the corresponding first function of the called function in the first default global variable and call stack address
Information, the output abnormality signal if judgement knows that the called function occurs to be operating abnormally, and according to the abnormal signal into
Row abnormality processing, and the first function call stack address information is extracted from the described first default global variable, to described
It is exported after the decoding of one function call stack address information, improves application exception treatment effeciency.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is this hair
Bright some embodiments for those of ordinary skill in the art without creative efforts, can be with root
Other attached drawings are obtained according to these attached drawings.
Fig. 1 is the flow diagram of application exception processing method provided in an embodiment of the present invention;
Fig. 2 is the overall flow schematic diagram of application exception processing method provided in an embodiment of the present invention;
Fig. 3 is the structural schematic diagram of application exception processing unit provided in an embodiment of the present invention;
Fig. 4 is electronic equipment entity apparatus structural schematic diagram provided in an embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical solution in the embodiment of the present invention is explicitly described, it is clear that described embodiment is the present invention
A part of the embodiment, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not having
Every other embodiment obtained under the premise of creative work is made, shall fall within the protection scope of the present invention.
Fig. 1 is the flow diagram of application exception processing method provided in an embodiment of the present invention, as shown in Figure 1, this
Embodiment provides a kind of application exception processing method, comprising:
S101, the called function into application program to be processed, while in the first default global variable described in record
The called corresponding first function call stack address information of function;
Specifically, include multiple functions in an application program, to be held by calling function to complete the application program
Capable movement;The function includes principal function and non-principal function, and principal function can call the non-principal function, the non-principal function
Other non-principal functions can be called, can also be by other non-master function calls, but it is not capable of calling the principal function, it is run in program
It is in the process the called function by the function of principal function and non-master function call.In the called function called
When, exception handling device is driven into the called function, while described be called is recorded in the first default global variable
The corresponding first function call stack address information of function;Calling can both be passed through by recording the first function call stack address information
The customized macro interface letter that is recorded, can also be called by rewriting the function that is called described in compiling option definition when entering
Number is recorded.It is understood that the first default global variable is constructed in advance for storing the called letter
Several first function call stack address informations can recorde function tune of multiple application programs when calling the called function
With stack address information.
S102, the output abnormality signal if judgement knows that the called function occurs to be operating abnormally, and according to described different
Regular signal carries out abnormality processing;
Specifically, described device output abnormality signal if judgement knows that the called function occurs to be operating abnormally, and
Abnormality processing is carried out according to the abnormal signal.It is understood that the operation exception may include that buffer overflow, sky refer to
Needle is abnormal, it is abnormal to remove zero, memory overwriting is abnormal, illegally rewrites exception and the excessively high exception of CPU usage, can also be different including other
Often, it is not specifically limited herein, specifically can be configured and adjust according to the actual situation, be not specifically limited herein;It is described
Abnormal signal can be soft interrupt signal, can also be other signals, specifically can be configured and adjust according to the actual situation,
It is not specifically limited herein.
S103, the first function call stack address information is extracted from the described first default global variable, and to described
It is exported after the decoding of first function call stack address information.
Specifically, described device extracts the first function from the described first default global variable and calls stack address letter
Breath, then prints the first function call stack address information, calls pre-set decoding program to the first function tune
It is decoded with stack address information, then into decoded first function calling stack address is exported, so that staff can basis
The first function calls stack address to carry out abnormal backtracking.
Application exception processing method provided in an embodiment of the present invention, by entering being adjusted for application program to be processed
With the called function corresponding first function call stack address information is recorded when function in the first default global variable, if
Judgement knows that the called function occurs to be operating abnormally then output abnormality signal, and carries out exception according to the abnormal signal
Reason, and the first function call stack address information is extracted from the described first default global variable, to the first function tune
With being exported after the decoding of stack address information, application exception treatment effeciency is improved.
On the basis of the above embodiments, further, the method also includes:
If judgement knows that the called function is not operating abnormally, after the called function operation terminates
It records the corresponding second function call stack address information of the called function and exits the called function.
Specifically, if described device judgement knows that the called function is not operating abnormally, described called
Function operation records the corresponding second function call stack address information of the called function and exits described adjusted after terminating
With function, so that staff carries out inquiring call stack address information when the called function exits when needed.
It is understood that the second function call stack address information again may be by it is customized it is macro recorded, can also lead to
The interface function that function is called when entering that is called described in rewriting compiling option definition is crossed to be recorded, it specifically can be according to reality
Border situation is configured and adjusts, and is not specifically limited herein.
On the basis of the above embodiments, further, if the judgement knows that the called function generation operation is different
Normal then output abnormality signal, comprising:
If judgement, which is known, occurs buffer overflow, null pointer access exception and except zero in the operational process of the application program
In exception any one or combinations thereof, then it is abnormal to determine that the first kind occurs for the called function, it is different to export the first kind
Normal corresponding first abnormal signal.
Specifically, if described device judgement knows that generation buffer overflow, sky refer in the operational process of the application program
Needle access exception and except in zero exception any one or combinations thereof, then it is abnormal to determine that the first kind occurs for the application program, it is defeated
Extremely corresponding first abnormal signal of the first kind out.It is understood that the first kind include extremely buffer overflow,
Null pointer access exception and except zero is abnormal, has the first kind abnormality detection mechanism in generally called function, can exist automatically
First abnormal signal is exported when the first kind occurs extremely, first abnormal signal can be soft interrupt signal, described soft
Interrupt signal can be set to 1-64 totally 64 codes, and buffer overflow that the first kind includes extremely, null pointer access are different
Often and except zero exception respectively corresponds respective code.It should be noted that the first kind can also include other exceptions extremely,
Specifically it can be configured and adjust according to the actual situation, be not specifically limited herein.
On the basis of the above embodiments, further, if the judgement knows that the called function generation operation is different
Normal then output abnormality signal, comprising:
Obtain the corresponding current value of monitored object stored in the second default global variable;
If judgement knows that current value preset standard value corresponding with the monitored object is inconsistent, the quilt is determined
It calls function that the second class exception occurs, exports extremely corresponding second abnormal signal of second class.
Specifically, described device obtains the corresponding current value of monitored object stored in the second default global variable, if sentencing
It is disconnected to know that current value preset standard value corresponding with the monitored object is inconsistent, then determine that the called function occurs
Second class is abnormal, exports extremely corresponding second abnormal signal of second class.It should be noted that second class is extremely
Memory overwriting and illegal rewriting are abnormal, since the testing mechanism for the type exception is not present in generally called function,
Need the second class described in active detecting abnormal.It should be noted that described device obtains the corresponding current value of the monitored object,
It can be obtained at the time of after entering the called function and before exiting the called function respectively, it can also be with
It is obtained in real time in the operational process of the called function, specifically can be configured and adjust according to the actual situation, herein
It is not specifically limited.It is understood that the second class abnormal signal is also possible to 64 codes of the soft interrupt signal
In one;The monitored object is traditionally arranged to be 3-6, and each monitored object has corresponding preset standard respectively
Value, can be configured and adjust according to the actual situation, be not specifically limited herein.
On the basis of the above embodiments, further, default to described second after entering the called function
Mutual exclusion lock label is arranged in global variable.
Specifically, after entering the called function, described device is arranged the described second default global variable mutual
Reprimand lock label, the right second default global variable carry out mutual exclusion protection, prevent the institute in the described second default global variable
It states monitored object to be rewritten by the called function in other applications, can detect the described current of the monitored object
When value preset standard value corresponding with the monitored object is inconsistent, it is different to determine that second class occurs for the called function
Often.
On the basis of the above embodiments, further, if the judgement knows that the called function generation operation is different
Normal then output abnormality signal, comprising:
In the operational process of the called function, CPU occupation rate is obtained in real time;
If judgement knows that the CPU occupation rate not less than preset threshold, determines that third class occurs for the called function
It is abnormal, export the extremely corresponding third abnormal signal of the third class.
Specifically, in the operational process of the called function, described device is opened another window and is obtained in real time
CPU occupation rate, if judgement knows that the CPU occupation rate not less than preset threshold, determines that third occurs for the called function
Class is abnormal, exports the extremely corresponding third abnormal signal of the third class using kill order.It is understood that described default
Threshold value can be set to 100%, may be set to be other numerical value;The third abnormal signal is also possible to the traps letter
Number 64 codes in one, specifically can be configured and adjust according to the actual situation, be not specifically limited herein.
It is in the above embodiments, described that abnormality processing is carried out according to the abnormal signal, comprising:
The exception handler list stored according to the abnormal signal and in advance, determines that the abnormal signal is corresponding
Target exception handler, and the target exception handler is called to carry out abnormality processing;The exception handler list
Including the corresponding relationship between abnormal signal and exception handler.
Specifically, after described device detects the abnormal signal, traps program is triggered according to the abnormal signal
And the corresponding relationship in the exception handler list stored in advance between abnormal signal and exception handler, determine described in
The corresponding target exception handler of abnormal signal, and the target exception handler is called to carry out correspondingly abnormality processing.
Wherein, the abnormal signal includes first abnormal signal, second abnormal signal and described in above-described embodiment
Three abnormal signals;The exception handler list can be as shown in table 1.If should be noted that described device described different
The abnormal signal for not finding output in normal processing routine list, then call default handler to carry out abnormality processing.
Table 1
Application exception processing method provided in an embodiment of the present invention, by entering being adjusted for application program to be processed
With the called function corresponding first function call stack address information is recorded when function in the first default global variable, if
Judgement knows that the called function occurs to be operating abnormally then output abnormality signal, and carries out exception according to the abnormal signal
Reason, and the first function call stack address information is extracted from the described first default global variable, to the first function tune
With being exported after the decoding of stack address information, application exception treatment effeciency is improved.
Fig. 2 is the overall flow schematic diagram of application exception processing method provided in an embodiment of the present invention, such as Fig. 2 institute
Show, application exception processing method provided in an embodiment of the present invention specifically includes the following steps:
S201, into called function and first function call stack address information is recorded;Application exception processing unit
Into the called function of application program to be processed, while the called function is recorded in the first default global variable and is corresponded to
First function call stack address information, then execute step S202;
S202, judge whether called function is operating abnormally;Described device judges that the called function is transported
Row is abnormal, if so, S203 is thened follow the steps, it is no to then follow the steps S207;
Step S202 includes:
S2021, judge whether buffer overflow, null pointer exception to occur and except any one in zero exception or combinations thereof;
If so, thening follow the steps 2022;
S2022, determine that first kind exception occurs;Then step S2031 is executed;
S2023, the corresponding current value of monitored object is obtained;Then step S2024 is executed;
S2024, judge whether current value and preset standard value are consistent;Described device judges the current value of the monitored object
Whether preset standard value corresponding with the monitored object is consistent;If so, thening follow the steps 2025;
S2025, determine that the second class exception occurs;Then step S2032 is executed;
S2026, CPU occupation rate is obtained in real time;Then step S2027 is executed;
S2027, judge whether CPU occupation rate is not less than preset threshold;If so, thening follow the steps 2028;
S2028, determine that third class exception occurs;Then step S2033 is executed;
S203, output abnormality signal;Then step S204 is executed;
Step S203 includes:
S2031, the first abnormal signal of output;
S2031, the second abnormal signal of output;
S2031, output third abnormal signal;
S204, judge whether abnormal signal is abnormal signal to be captured;If described device is arranged in the exception handler
The abnormal signal that output is found in table then determines that the abnormal signal is abnormal signal to be captured, thens follow the steps
Otherwise S205 executes step S206;
S205, according to abnormal signal and carry out abnormality processing;Described device is according to the abnormal signal and storage in advance
Corresponding relationship in the exception handler list deposited between abnormal signal and exception handler, determines the abnormal signal pair
The target exception handler answered, and the target exception handler is called to carry out correspondingly abnormality processing;Then step is executed
Rapid S209;
S206, default procedures are called to carry out abnormality processing;Then step S209 is executed;
S207, discriminant function whether end of run;If so, then follow the steps S208, otherwise return step S202;
S208, judgement are not operating abnormally and record second function call stack address information;Then step S209 is executed;
S209, function is exited.
Application exception processing method provided in an embodiment of the present invention, by entering being adjusted for application program to be processed
With the called function corresponding first function call stack address information is recorded when function in the first default global variable, if
Judgement knows that the called function occurs to be operating abnormally then output abnormality signal, and carries out exception according to the abnormal signal
Reason, and the first function call stack address information is extracted from the described first default global variable, to the first function tune
With being exported after the decoding of stack address information, application exception treatment effeciency is improved.
Fig. 3 is application exception processing unit provided in an embodiment of the present invention, as shown in figure 3, the embodiment of the present invention mentions
For a kind of application exception processing unit, comprising: recording unit 301, processing unit 302 and output unit 303, in which:
Recording unit 301 is used to enter the called function of application program to be processed, while in the first default global variable
In record the corresponding first function call stack address information of the called function;
Processing unit 302 is used for the output abnormality signal if judgement knows that the called function occurs to be operating abnormally, and
Abnormality processing is carried out according to the abnormal signal;
Output unit 303 calls stack address letter for extracting the first function from the described first default global variable
Breath, and exported after being decoded to the first function call stack address information.
Application exception processing unit provided in an embodiment of the present invention, by entering being adjusted for application program to be processed
With the called function corresponding first function call stack address information is recorded when function in the first default global variable, if
Judgement knows that the called function occurs to be operating abnormally then output abnormality signal, and carries out exception according to the abnormal signal
Reason, and the first function call stack address information is extracted from the described first default global variable, to the first function tune
With being exported after the decoding of stack address information, application exception treatment effeciency is improved.
The embodiment of device provided by the invention specifically can be used for executing the process flow of above-mentioned each method embodiment,
Details are not described herein for function, is referred to the detailed description of above method embodiment.
Fig. 4 is the entity structure schematic diagram of electronic equipment of the embodiment of the present invention, as shown in figure 4, the electronic equipment can wrap
It includes: processor (processor) 401, memory (memory) 402 and bus 403, wherein processor 401, memory 402 are logical
It crosses bus 403 and completes mutual communication.Processor 401 can call the computer program in memory 402, as follows to execute
Method: enter the called function of application program to be processed, while recording the called letter in the first default global variable
The corresponding first function call stack address information of number;The output abnormality if judgement knows that the called function occurs to be operating abnormally
Signal, and abnormality processing is carried out according to the abnormal signal;The first function is extracted from the described first default global variable
Call stack address information, and exported after being decoded to the first function call stack address information.
The embodiment of the present invention discloses a kind of computer program product, and the computer program product is non-transient including being stored in
Computer program on computer readable storage medium, the computer program include program instruction, when described program instructs quilt
When computer executes, computer is able to carry out method provided by above-mentioned each method embodiment, for example, enters to be processed answer
With the called function of program, while the corresponding first function tune of the called function is recorded in the first default global variable
With stack address information;The output abnormality signal if judgement knows that the called function occurs to be operating abnormally, and according to described different
Regular signal carries out abnormality processing;The first function call stack address information is extracted from the described first default global variable, and
It is exported after being decoded to the first function call stack address information.
The embodiment of the present invention provides a kind of non-transient computer readable storage medium, the non-transient computer readable storage
Medium storing computer program, the computer program make the computer execute side provided by above-mentioned each method embodiment
Method, for example, enter the called function of application program to be processed, while recording the quilt in the first default global variable
Call the corresponding first function call stack address information of function;It is defeated if judgement knows that the called function occurs to be operating abnormally
Abnormal signal out, and abnormality processing is carried out according to the abnormal signal;Described is extracted from the described first default global variable
One function call stack address information, and exported after being decoded to the first function call stack address information.
In addition, the logical order in above-mentioned memory 402 can be realized by way of SFU software functional unit and conduct
Independent product when selling or using, can store in a computer readable storage medium.Based on this understanding, originally
Substantially the part of the part that contributes to existing technology or the technical solution can be in other words for the technical solution of invention
The form of software product embodies, which is stored in a storage medium, including some instructions to
So that a computer equipment (can be personal computer, server or the network equipment etc.) executes each implementation of the present invention
The all or part of the steps of example the method.And storage medium above-mentioned include: USB flash disk, mobile hard disk, read-only memory (ROM,
Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. it is various
It can store the medium of program code.
The apparatus embodiments described above are merely exemplary, wherein described, unit can as illustrated by the separation member
It is physically separated with being or may not be, component shown as a unit may or may not be physics list
Member, it can it is in one place, or may be distributed over multiple network units.It can be selected according to the actual needs
In some or all of the modules achieve the purpose of the solution of this embodiment.Those of ordinary skill in the art are not paying creativeness
Labour in the case where, it can understand and implement.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can
It realizes by means of software and necessary general hardware platform, naturally it is also possible to pass through hardware.Based on this understanding, on
Stating technical solution, substantially the part that contributes to existing technology can be embodied in the form of software products in other words, should
Computer software product may be stored in a computer readable storage medium, such as ROM/RAM, magnetic disk, CD, including several fingers
It enables and using so that a computer equipment (can be personal computer, server or the network equipment etc.) executes each implementation
Method described in certain parts of example or embodiment.
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although
Present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: it still can be with
It modifies the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features;And this
It modifies or replaces, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution.
Claims (10)
1. a kind of application exception processing method characterized by comprising
Into the called function of application program to be processed, while the called function is recorded in the first default global variable
Corresponding first function call stack address information;
The output abnormality signal if judgement knows that the called function occurs to be operating abnormally, and carried out according to the abnormal signal
Abnormality processing;
The first function call stack address information is extracted from the described first default global variable, and to the first function tune
It is exported after being decoded with stack address information.
2. the method according to claim 1, wherein the method also includes:
If judgement knows that the called function is not operating abnormally, recorded after the called function operation terminates
The corresponding second function call stack address information of the called function simultaneously exits the called function.
3. the method according to claim 1, wherein if the judgement knows that the called function is run
Abnormal then output abnormality signal, comprising:
If judgement, which is known, occurs buffer overflow, null pointer access exception and except zero is abnormal in the operational process of the application program
In any one or combinations thereof, then it is abnormal to determine that the first kind occurs for the called function, it is extremely right to export the first kind
The first abnormal signal answered.
4. according to the method described in claim 2, it is characterized in that, if the judgement knows that the called function is run
Abnormal then output abnormality signal, comprising:
Obtain the corresponding current value of monitored object stored in the second default global variable;
If judgement knows that current value preset standard value corresponding with the monitored object is inconsistent, determine described called
Second class exception occurs for function, exports extremely corresponding second abnormal signal of second class.
5. according to the method described in claim 4, it is characterized in that, the method also includes:
After entering the called function, mutual exclusion lock label is arranged to the described second default global variable.
6. the method according to claim 1, wherein if the judgement knows that the called function is run
Abnormal then output abnormality signal, comprising:
In the operational process of the called function, CPU occupation rate is obtained in real time;
If judgement knows that the CPU occupation rate not less than preset threshold, determines that third class exception occurs for the called function,
Export the extremely corresponding third abnormal signal of the third class.
7. method described in -6 any one according to claim 1, which is characterized in that described different according to abnormal signal progress
Often processing, comprising:
The exception handler list stored according to the abnormal signal and in advance, determines the corresponding target of the abnormal signal
Exception handler, and the target exception handler is called to carry out abnormality processing;The exception handler list includes
Corresponding relationship between abnormal signal and exception handler.
8. a kind of application exception processing unit, which is characterized in that including recording unit, processing unit and output unit,
In:
Recording unit for entering the called function of application program to be processed, while recording in the first default global variable
The corresponding first function call stack address information of the called function;
Processing unit, for the output abnormality signal if judgement knows that the called function occurs to be operating abnormally, and according to institute
It states abnormal signal and carries out abnormality processing;
Output unit, for extracting the first function call stack address information from the described first default global variable, and it is right
It is exported after the first function call stack address information decoding.
9. a kind of electronic equipment, which is characterized in that including processor, memory and bus, in which:
The processor, the memory complete mutual communication by bus;
The processor can call the computer program in memory, to execute as described in claim 1-7 any one
The step of method.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor
It realizes when execution such as the step of claim 1-7 any one the method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810209141.2A CN110275791A (en) | 2018-03-14 | 2018-03-14 | A kind of application exception processing method and processing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810209141.2A CN110275791A (en) | 2018-03-14 | 2018-03-14 | A kind of application exception processing method and processing device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110275791A true CN110275791A (en) | 2019-09-24 |
Family
ID=67958416
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810209141.2A Withdrawn CN110275791A (en) | 2018-03-14 | 2018-03-14 | A kind of application exception processing method and processing device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110275791A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114996098B (en) * | 2022-06-24 | 2024-04-09 | 中电金信软件有限公司 | Exception handling method and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101211309A (en) * | 2006-12-29 | 2008-07-02 | 中兴通讯股份有限公司 | Embedded system progress abnormal tracking position-finding method |
CN101539883A (en) * | 2009-05-05 | 2009-09-23 | 北京和利时系统工程有限公司 | Error tracking method of embedded system and device thereof |
JP2010102454A (en) * | 2008-10-22 | 2010-05-06 | Fuji Xerox Co Ltd | Information processing apparatus and information processing program |
CN107704356A (en) * | 2017-06-12 | 2018-02-16 | 平安科技(深圳)有限公司 | Exception stack information acquisition method, device and computer-readable recording medium |
-
2018
- 2018-03-14 CN CN201810209141.2A patent/CN110275791A/en not_active Withdrawn
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101211309A (en) * | 2006-12-29 | 2008-07-02 | 中兴通讯股份有限公司 | Embedded system progress abnormal tracking position-finding method |
JP2010102454A (en) * | 2008-10-22 | 2010-05-06 | Fuji Xerox Co Ltd | Information processing apparatus and information processing program |
CN101539883A (en) * | 2009-05-05 | 2009-09-23 | 北京和利时系统工程有限公司 | Error tracking method of embedded system and device thereof |
CN107704356A (en) * | 2017-06-12 | 2018-02-16 | 平安科技(深圳)有限公司 | Exception stack information acquisition method, device and computer-readable recording medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114996098B (en) * | 2022-06-24 | 2024-04-09 | 中电金信软件有限公司 | Exception handling method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9838405B1 (en) | Systems and methods for determining types of malware infections on computing devices | |
KR102534334B1 (en) | Detection of software attacks on processes in computing devices | |
US10395033B2 (en) | System, apparatus and method for performing on-demand binary analysis for detecting code reuse attacks | |
CN109840199A (en) | A kind of automated testing method and terminal | |
CN107491373A (en) | A kind of task stack overflow monitoring method and system | |
CN107742079A (en) | Malware recognition methods and system | |
JP2010257150A (en) | Device and method for detection of fraudulence processing, and program | |
CN112966113A (en) | Data risk prevention and control method, device and equipment | |
CN107239698A (en) | A kind of anti-debug method and apparatus based on signal transacting mechanism | |
CN110275791A (en) | A kind of application exception processing method and processing device | |
CN113312620A (en) | Program safety detection method and device, processor chip and server | |
CN107608717B (en) | User mode information collection method, device and system | |
CN107526622A (en) | Rapid exception handling method and device for Linux | |
KR101988747B1 (en) | Ransomware dectecting method and apparatus based on machine learning through hybrid analysis | |
CN110210215B (en) | Virus detection method and related device | |
CN109543403A (en) | A kind of system calls behavior sequence dimension reduction method, system, device and storage medium | |
US20220253524A1 (en) | Malware Detection System | |
CN105912417A (en) | Detection method of virtual system, related software running method and related device | |
CN111447086B (en) | Service processing method and device and electronic equipment | |
CN112463486A (en) | Disk quality inspection method, system, terminal and storage medium | |
CN114301768A (en) | Anomaly detection method and device for Network Function Virtualization (NFV) equipment | |
CN110837433A (en) | Performance optimization method and device and electronic equipment | |
US6795879B2 (en) | Apparatus and method for wait state analysis in a digital signal processing system | |
CN116881918B (en) | Process safety detection protection method and device, electronic equipment and medium | |
CN110909351B (en) | Hardware-assisted control structure invariant mining method |
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 | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20190924 |
|
WW01 | Invention patent application withdrawn after publication |