CN108170434A - The parallel acquisition methods and device in dangerous path - Google Patents

The parallel acquisition methods and device in dangerous path Download PDF

Info

Publication number
CN108170434A
CN108170434A CN201711435666.XA CN201711435666A CN108170434A CN 108170434 A CN108170434 A CN 108170434A CN 201711435666 A CN201711435666 A CN 201711435666A CN 108170434 A CN108170434 A CN 108170434A
Authority
CN
China
Prior art keywords
path
point
definite value
controlling stream
invocation
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
CN201711435666.XA
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.)
Capital Normal University
Original Assignee
Capital Normal University
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 Capital Normal University filed Critical Capital Normal University
Priority to CN201711435666.XA priority Critical patent/CN108170434A/en
Publication of CN108170434A publication Critical patent/CN108170434A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/45Exploiting coarse grain parallelism in compilation, i.e. parallelism between groups of instructions
    • G06F8/456Parallelism detection

Abstract

The parallel acquisition methods and device in danger path provided by the invention, pre-process by using by the controlling stream graph of acquisition, obtain y-bend controlling stream graph;Two Coded of parallel route is carried out to y-bend controlling stream graph, obtains two Coded of path on each vertex in y-bend controlling stream graph;According to vertex information of the corresponding multiple definite value points of preset multiple invocation points and each invocation point on y-bend controlling stream graph, two Coded of path of each invocation point and the corresponding multiple definite value points of each invocation point is determined;According to two Coded of path of the corresponding multiple definite value points of each invocation point, the target definite value point of each invocation point is determined parallel, determined using target definite value point the path where the corresponding invocation point of target definite value point whether be dangerous path technical solution, so as to by the simplification of path structure relationship in controlling stream graph and to path where multiple invocation points whether be dangerous path parallel judgement, and then in the case where ensureing accuracy in detection, effectively raise detection efficiency.

Description

The parallel acquisition methods and device in dangerous path
Technical field
The present invention relates to computer technology more particularly to a kind of parallel acquisition methods and device in dangerous path.
Background technology
During software program development, the detection to the dangerous path in software is to ensure that software program safety is reliable Essential important link.Definite value misquotation is to be susceptible to a kind of to endanger grave error class in dangerous path detection Type, is usually expressed as dangerous definite value and reaches invocation point then causing mistake, for example, null pointer dereference, buffer overflow, except zero Wrong, non-assignment reference etc..
In the existing detection to dangerous path, need to be directed to each paths and carry out path analysis one by one, still, when Path in program is more, when the structural relation between path is complex, easily leads to the problem of path explosion, this will cause Detection time increases, and detection efficiency is affected.
Invention content
In the prior art due to path structure complexity in order to solve, detection efficiency is low caused by quantity is more Problem, the present invention provides a kind of parallel acquisition methods and device in dangerous path.
On the one hand, the present invention provides a kind of parallel acquisition methods in dangerous path, including:
The controlling stream graph of acquisition is pre-processed, obtains y-bend controlling stream graph;
Two Coded of parallel route is carried out to the y-bend controlling stream graph, obtains each vertex in the y-bend controlling stream graph Two Coded of path;
According to the corresponding multiple definite value points of preset multiple invocation points and each invocation point on the y-bend controlling stream graph Vertex information, and determine two Coded of path of each invocation point and the corresponding multiple definite value points of each invocation point;
It is parallel to determine each to draw according to two Coded of path of the corresponding multiple definite value points of each invocation point and each invocation point With the target definite value point of point, and determine using the target definite value point path where the corresponding invocation point of the target definite value point Whether it is dangerous path;Wherein, the target definite value point is determined from the corresponding multiple definite value points of invocation point.
It is described according to each invocation point and the corresponding multiple definite values of each invocation point in wherein a kind of optional embodiment Two Coded of path of point determines the target definite value point of each invocation point parallel, including:
A thread is distributed for each invocation point, according to two Codeds of the multiple definite value point, selected distance reference The nearest definite value point of point is as target definite value point.
It is described to determine the target definite value point pair using the target definite value point in wherein a kind of optional embodiment Whether the path where the invocation point answered is dangerous path, including:
Determine the security attribute of the target definite value point;
If the security attribute of the target definite value point is dangerous, by the invocation point institute corresponding to the target definite value point Path, extract and be stored in dangerous set of paths as dangerous path.
It is described that two lacing of parallel route is carried out to the y-bend controlling stream graph in wherein a kind of optional embodiment Code obtains two Coded of path on each vertex in the y-bend controlling stream graph, including:
Piecemeal is carried out to the y-bend controlling stream graph, two lacing of path is carried out to the y-bend controlling stream graph of each piecemeal parallel Code, obtains two Coded of path on each vertex in the y-bend controlling stream graph of each piecemeal, the path two on whole vertex of acquisition Coded is then two Coded of path on each vertex in y-bend controlling stream graph.
It is described to pre-process the controlling stream graph of acquisition in wherein a kind of optional embodiment, obtain y-bend control Flow graph processed, including:
It carries out decyclization processing, digitized processing and stipulations to the controlling stream graph successively to handle, to obtain the y-bend Controlling stream graph.
On the other hand, the present invention also provides a kind of parallel acquisition device in dangerous path, including:
Preprocessing module for the controlling stream graph of acquisition to be pre-processed, obtains y-bend controlling stream graph;
Coding module for carrying out two Coded of parallel route to the y-bend controlling stream graph, obtains the y-bend control Two Coded of path on each vertex in flow graph;Existed according to the corresponding multiple definite value points of preset multiple invocation points and each invocation point Vertex information on the y-bend controlling stream graph, and determine the path of each invocation point and the corresponding multiple definite value points of each invocation point Two Codeds;
Dangerous path acquisition module, for the path two according to the corresponding multiple definite value points of each invocation point and each invocation point Coded, determines the target definite value point of each invocation point parallel, and determines the target definite value point using the target definite value point Whether the path where corresponding invocation point is dangerous path;Wherein, the target definite value point is corresponding multiple from invocation point It is determined in definite value point.
In wherein a kind of optional embodiment, danger path acquisition module is specifically used for:
A thread is distributed for each invocation point, according to two Codeds of the multiple definite value point, selected distance reference The nearest definite value point of point is as target definite value point.
In wherein a kind of optional embodiment, danger path acquisition module is specifically used for:
Determine the security attribute of the target definite value point;
If the security attribute of the target definite value point is dangerous, by the invocation point institute corresponding to the target definite value point Path, extract and be stored in dangerous set of paths as dangerous path.
In wherein a kind of optional embodiment, the coding module is specifically used for:
Piecemeal is carried out to the y-bend controlling stream graph, two lacing of path is carried out to the y-bend controlling stream graph of each piecemeal parallel Code, obtains two Coded of path on each vertex in the y-bend controlling stream graph of each piecemeal, the path two on whole vertex of acquisition Coded is then two Coded of path on each vertex in y-bend controlling stream graph.
In wherein a kind of optional embodiment, the preprocessing module is specifically used for:
It carries out decyclization processing, digitized processing and stipulations to the controlling stream graph successively to handle, to obtain the y-bend Controlling stream graph.
The parallel acquisition methods and device in danger path provided by the invention, carry out by using by the controlling stream graph obtained Pretreatment obtains y-bend controlling stream graph;Two Coded of parallel route is carried out to the y-bend controlling stream graph, obtains the y-bend control Two Coded of path on each vertex in flow graph processed;According to the corresponding multiple definite value points of preset multiple invocation points and each invocation point Vertex information on the y-bend controlling stream graph determines the path of each invocation point and the corresponding multiple definite value points of each invocation point Two Codeds;It is parallel to determine each according to two Coded of path of the corresponding multiple definite value points of each invocation point and each invocation point The target definite value point of invocation point, and determine using the target definite value point road where the corresponding invocation point of the target definite value point Diameter whether be dangerous path technical solution, so as to by drawing to the simplification of path structure relationship in controlling stream graph and to multiple Whether it is the parallel judgement in dangerous path, and then in the case where ensureing accuracy in detection, effectively improve with place path Detection efficiency.
Description of the drawings
Attached drawing herein is incorporated into specification and forms the part of this specification, shows the implementation for meeting the disclosure Example, and for explaining the principle of the disclosure together with specification.
Fig. 1 is the flow diagram of the parallel acquisition methods in a kind of dangerous path that the embodiment of the present invention one provides;
Fig. 2 (a) is the schematic diagram of a kind of controlling stream graph that the embodiment of the present invention one provides;
Fig. 2 (b) is a kind of schematic diagram of storage mode of controlling stream graph shown in Fig. 2 (a);
Fig. 2 (c) is the schematic diagram of another storage mode of controlling stream graph shown in Fig. 2 (a);
Fig. 3 is a kind of flow diagram of the parallel acquisition methods in dangerous path provided by Embodiment 2 of the present invention;
Fig. 4 is the structure diagram of the parallel acquisition device in a kind of dangerous path that the embodiment of the present invention three provides.
Pass through above-mentioned attached drawing, it has been shown that the specific embodiment of the disclosure will be hereinafter described in more detail.These attached drawings The range for limiting the disclosure by any mode and conceiving is not intended to word description, but is by reference to specific embodiment Those skilled in the art illustrate the concept of the disclosure.
Specific embodiment
Purpose, technical scheme and advantage to make the embodiment of the present invention are clearer, below in conjunction with the embodiment of the present invention In attached drawing, the technical solution in the embodiment of the present invention is clearly and completely described.
During software program development, the detection to the dangerous path in software is to ensure that software program safety is reliable Essential important link.Definite value misquotation is a kind of common in the detection in dangerous path and the serious mistake of harm Accidentally, it is usually expressed as dangerous definite value arrival reference and then causes mistake.Representative definite value misquotation draws including null pointer With, buffer overflow, remove zero wrong, non-assignment is quoted etc..
Existing in the detection method in above-mentioned dangerous path, generally by consider in controlling stream graph each branch it Between combination, to realize the differentiation to paths different on controlling stream graph so that each path can be carried out one by one analysis and Detection.But in the detection of definite value misquotation, since error source reaches the path of false target often Hen Changqie roads Diameter number is numerous, adopts in manner just described so that number of paths to be analyzed is huge, detection time is very long, and the efficiency of detection is very low.
Therefore, detection time how is effectively reduced, and improves detection efficiency and is asked as technology urgently to be resolved hurrily in this field Topic.
This application involves related notion explanation:Definite value misquotation refers to, because dangerous definite value has occurred, cause Mistake.Vertex in controlling stream graph is represents basic block, the digraph of the subsequent relationship of side forerunner between basic block.Definite value point is Refer to the assignment point for often referring to variable.Invocation point refers to often refer to the point of use of variable.
It should be noted that will be illustrated in detail to exemplary embodiment here, example is illustrated in the accompanying drawings.Under When the description in face is related to attached drawing, unless otherwise indicated, the same numbers in different attached drawings represent the same or similar element.Below Embodiment described in exemplary embodiment does not represent all embodiments consistent with the disclosure.On the contrary, they Only it is the example of the device and method consistent with some aspects being described in detail in such as the appended claims, the disclosure.
How the technical solution of technical scheme of the present invention and the application is solved with specifically embodiment below above-mentioned Technical problem is described in detail.These specific embodiments can be combined with each other below, for the same or similar concept Or process may repeat no more in certain embodiments.Below in conjunction with attached drawing, the embodiment of the present invention is described.
The flow diagram of the parallel acquisition methods in a kind of dangerous path that Fig. 1 embodiment of the present invention one provides.
As shown in Figure 1, the parallel acquisition methods in the danger path include:
Step 101 pre-processes the controlling stream graph of acquisition, obtains y-bend controlling stream graph.
It should be noted that concretely a kind of the parallel of dangerous path obtains dress to the executive agent of the embodiment of the present invention one It puts, can be specifically made of the program run in logic circuit, integrated chip, memory, processor and memory.
Specifically, controlling stream graph is that single Procedure Codes object structure to be analyzed is obtained, and is a process Or the abstraction of program, in general, the possibility that all vertex basic blocks perform in a program is represented in graph form Flow direction can also reflect the real-time implementation procedure of a process.In above-mentioned steps, when acquisition includes by dangerous definite value and possibility After the controlling stream graph of subgraph part between the invocation point of arrival, which can be pre-processed, to be flowed to control Figure is simplified and obtains the y-bend controlling stream graph of controlling stream graph.
Preferably, in a step 101, controlling stream graph can be carried out at decyclization processing, digitized processing and stipulations successively Reason, to obtain the y-bend controlling stream graph of controlling stream graph.Specifically, decyclization processing refers to remove the circle logic in controlling stream graph Relationship removes the cycle side in controlling stream graph;Digitized processing refers to the value and logic in the controlling stream graph after decyclization Relationship digitizes, i.e., is represented using 0/1 grade numerical value;Stipulations processing then refers to according to preset reduction rule to the control after digitlization Flow graph carries out simplifying processing, to finally obtain y-bend controlling stream graph, wherein it is appreciated that being directed to every in y-bend controlling stream graph The maximum value of one vertex, in-degree and out-degree is two.
Step 102 carries out two Coded of parallel route to the y-bend controlling stream graph, obtains in the y-bend controlling stream graph Two Coded of path on each vertex.
Specifically, in a step 102, due to simplifying to controlling stream graph, the calculation of two Codeds can be used Method or two Coded rules carry out vertex, side, path in y-bend controlling stream graph etc. coded treatment, and the shape to encode array Formula is stored.Wherein it is appreciated that each vertex in y-bend controlling stream graph represents a basic block, arc is then two The side for having points relationship between vertex, and path then shares vertex by several arcs and arc and forms.
Optionally, it is above-mentioned carry out two Codeds to y-bend controlling stream graph to handle to be carried out along the range of y-bend controlling stream graph 's.Furthermore, it is understood that y-bend controlling stream graph is obtained since controlling stream graph is carried out pretreatment, it controls and flows from the y-bend The vertex on one layer of the top of figure starts, and carries out two Coded processing, that is, after having handled one layer of vertex, the top of next layer of processing Point.Wherein, processed vertex is directed to, the mode that mark can be used is identified it in order to avoid reprocessing.
In addition, parallel mode, which also can be used, carries out two Coded processing:Piecemeal is carried out to the y-bend controlling stream graph, parallel Two Coded of path is carried out to the y-bend controlling stream graph of each piecemeal, obtains each vertex in the y-bend controlling stream graph of each piecemeal Two Coded of path, the path two of two Coded of path on whole vertex of acquisition then for each vertex in y-bend controlling stream graph is divided Coding.Above-mentioned piecemeal can be random division, and the present invention is not limited this.
Optionally, two Coded of path of opposite vertexes is stored in the following way:Fig. 2 (a) is the embodiment of the present invention A kind of schematic diagram of one controlling stream graph provided;Fig. 2 (b) is a kind of signal of storage mode of controlling stream graph shown in Fig. 2 (a) Figure;Can be used as shown in Fig. 2 (a) and Fig. 2 (b) vertical array, number of edges group, the mode of vertex out-degree array describe vertex encoding with And arc coding;Wherein, vertical array is from each vertex (the 1st article of subscript of the arc in number of edges group of basic block).If certain Vertex does not have subsequent, then corresponding array module element value is set as -1.Number of edges group refers to the other end from the arc on certain vertex The subscript on vertex.Vertex out-degree array refers to the out-degree information on each vertex.For example, by taking Outdegree [1]=2 as an example, represent 1 vertex is designated as under in Vexs arrays two injection arcs, wherein the arc head of the 1st article of arc is Arcs [Vexs [1]]=Arcs [2]=3, i.e. arc<1,3>;The arc head of another 1 arc is Arcs [Vexs [1]+Outdegree [1] -1]=Arcs [3]=4.
Fig. 2 (c) is the schematic diagram of another storage mode of controlling stream graph shown in Fig. 2 (a).In Fig. 2 (c), respectively with 1 The corresponding coding of true and false branch is represented with 0, and between -2 presentation codes or operation, a line of the array correspond to a vertex.For example, Be designated as under in figure 4 row represent vertex B4 two Coded of path, storage form be " 10-201 ", it is corresponding be encoded to " 10 | | 01”。
That is, in two Coded of store path, following rule can be used:Rule 1:Two lacings of entrance basic block Code is ε;Rule 2:If two Codeds of basic block Bi are x, true successor basic blocks are Bj, false ramification successor basic blocks are Bj+1, Then BjBe encoded to x1, Bj+1Be encoded to x0.Wherein, " " represents connection, it can be omitted, as x1 can be abbreviated as x1;Rule 3:If basic block BkTwo forerunners be respectively Bk-1And Bk-2, and Bk-1Be encoded to y1, Bk-2Be encoded to y2, then Bk Be encoded to y1 | | y2.Wherein, " | | " represent or.
Step 103, according to the corresponding multiple definite value points of preset multiple invocation points and each invocation point in the y-bend control Vertex information on flow graph processed, and determine two Coded of path of each invocation point and the corresponding multiple definite value points of each invocation point.
Step 104, two Coded of path according to the corresponding multiple definite value points of each invocation point and each invocation point, it is parallel true The target definite value point of fixed each invocation point, and determine the corresponding invocation point institute of the target definite value point using the target definite value point Path whether be dangerous path;Wherein, the target definite value point is determined from the corresponding multiple definite value points of invocation point.
Specifically, in step 103 and 104, what invocation point generally obtained in advance, quantity is generally multiple, and Where invocation point on path generally there are multiple definite value points, pass through the analysis to y-bend controlling stream graph, it is known that each invocation point and The vertex information of each definite value point, path where which specifically can refer to invocation point and branch's trend etc..Then, by The information on each vertex is described in two Coded of path, therefore, two Codeds determines the road of each invocation point using the path Two Coded of path of two Coded of diameter and the corresponding multiple definite value points of each invocation point.
Then, using the mode of parallel parsing, determine that one is determined from multiple definite value points corresponding to each invocation point Target definite value point of the value point as invocation point, and the path according to where the security attribute of the target definite value point determines invocation point is No is dangerous path.
That is, in the above-described embodiment, on the one hand simplifying controlling stream graph, and pass through the side of two Codeds Formula is stored, and to realize the division to every paths, each path where invocation point is carried out followed by parallel form Dangerous path judgement and extraction, so as to obtain final dangerous set of paths, and then effectively increase the effect of entire detection process Rate.
The embodiment of the present invention one provide dangerous path parallel acquisition methods, by using by the controlling stream graph obtained into Row pretreatment, obtains y-bend controlling stream graph;Two Coded of parallel route is carried out to the y-bend controlling stream graph, obtains the y-bend Two Coded of path on each vertex in controlling stream graph;According to preset multiple invocation points and the corresponding multiple definite values of each invocation point Vertex information of the point on the y-bend controlling stream graph determines the road of each invocation point and the corresponding multiple definite value points of each invocation point Two Coded of diameter;It is parallel to determine often according to two Coded of path of the corresponding multiple definite value points of each invocation point and each invocation point The target definite value point of a invocation point, and where determining the corresponding invocation point of the target definite value point using the target definite value point Path whether be dangerous path technical solution, so as to by the simplification of path structure relationship in controlling stream graph and to multiple Whether path where invocation point is the parallel judgement in dangerous path, and then in the case where ensureing accuracy in detection, effectively carry High detection efficiency.
On the basis of embodiment one, in order to further describe the parallel acquisition methods in dangerous path provided by the invention, Fig. 3 is a kind of flow diagram of the parallel acquisition methods in dangerous path provided by Embodiment 2 of the present invention.
Step 201 pre-processes the controlling stream graph of acquisition, obtains y-bend controlling stream graph.
Step 202 carries out two Coded of parallel route to the y-bend controlling stream graph, obtains in the y-bend controlling stream graph Two Coded of path on each vertex.
Step 203, according to the corresponding multiple definite value points of preset multiple invocation points and each invocation point in the y-bend control Vertex information on flow graph processed, and determine two Coded of path of each invocation point and the corresponding multiple definite value points of each invocation point.
Step 204 distributes a thread for each invocation point, according to two Codeds of the multiple definite value point, chooses Apart from the nearest definite value point of invocation point as target definite value point.
Step 205, the security attribute for determining the target definite value point.
If the security attribute of step 206, the target definite value point is dangerous, will be corresponding to the target definite value point Path where invocation point extracts as dangerous path and is stored in dangerous set of paths.
It should be noted that with embodiment one similarly, the executive agent of the embodiment of the present invention two is concretely a kind of The parallel acquisition device in dangerous path, specifically can be by logic circuit, integrated chip, memory, processor and memory The program composition run.
Specifically, controlling stream graph is that single Procedure Codes object structure to be analyzed is obtained, and is a process Or the abstraction of program, in general, the possibility that all vertex basic blocks perform in a program is represented in graph form Flow direction can also reflect the real-time implementation procedure of a process.In above-mentioned steps, when acquisition includes by dangerous definite value and possibility After the controlling stream graph of subgraph part between the invocation point of arrival, which can be pre-processed, to be flowed to control Figure is simplified and obtains the y-bend controlling stream graph of controlling stream graph.Preferably, can decyclization processing, number be carried out to controlling stream graph successively Word processing and stipulations processing, to obtain the y-bend controlling stream graph of controlling stream graph.Specifically, decyclization processing refers to removal control Circle logic relationship in flow graph processed removes the cycle side in controlling stream graph;Digitized processing refers to the control after decyclization Value and logical relation digitlization in flow graph, i.e., represented using 0/1 grade numerical value;Stipulations processing then refers to advises according to preset stipulations Then the controlling stream graph after digitlization is carried out to simplify processing, to finally obtain y-bend controlling stream graph, wherein it is appreciated that being directed to The maximum value of each vertex in y-bend controlling stream graph, in-degree and out-degree is two.
Subsequently, as simplifying to controlling stream graph, therefore two Coded algorithms or two Codeds rule can be used Coded treatment is carried out, and stored in the form of encoding array to vertex, side, path in y-bend controlling stream graph etc..Wherein It is appreciated that each vertex in y-bend controlling stream graph represents a basic block, arc then having between two vertex The side of points relationship, and path then shares vertex by several arcs and arc and forms.
Optionally, parallel mode can be used and carry out two Coded processing:Piecemeal is carried out to the y-bend controlling stream graph, parallel Two Coded of path is carried out to the y-bend controlling stream graph of each piecemeal, obtains each vertex in the y-bend controlling stream graph of each piecemeal Two Coded of path, the path two of two Coded of path on whole vertex of acquisition then for each vertex in y-bend controlling stream graph is divided Coding.Above-mentioned piecemeal can be random division, and the present invention is not limited this.
It should be noted that the storage mode of above-mentioned two Coded of path can be found in the corresponding contents in embodiment one, The present embodiment two is to this without repeating.
What is different from the first embodiment is that in the present embodiment two, it is corresponding multiple according to each invocation point and each invocation point Two Coded of path of definite value point, determines the target definite value point of each invocation point parallel, and is determined using the target definite value point Whether the path where the corresponding invocation point of the target definite value point is dangerous path:A line is distributed for each invocation point Journey, according to two Codeds of the multiple definite value point, the nearest definite value point of selected distance invocation point is as target definite value point.Determine institute State the security attribute of target definite value point;If the security attribute of the target definite value point is dangerous, by the target definite value point Path where corresponding invocation point extracts as dangerous path and is stored in dangerous set of paths.
Specifically, after the coding array for obtaining y-bend controlling stream graph, can certain amount be obtained according to detection demand Invocation point.Then, a thread is distributed for each invocation point to carry out the detection and extraction in corresponding dangerous path.Into one For step, for the selection of the target definite value point of each invocation point, it can be determined according to two Coded of path of each definite value point:It is logical The code length analysis to each definite value point is crossed, the longest definite value point of code length can be therefrom chosen, as invocation point Target definite value point, in general, the code length of invocation point and definite value point is more similar, and the two distance is nearer, positioned at upstream The code length on vertex will be less than the code length positioned at the vertex in downstream.
Finally, the security attribute of the target definite value point is judged, and will judges judgement of the result as whole path As a result.Even the security attribute of the definite value point is dangerous or potentially unsafe, then by the road of the corresponding invocation point of definite value point Diameter is as the dangerous dangerous set of paths of path deposit.
That is, the present embodiment two is on the basis of embodiment one, also by a mesh nearest apart from invocation point Calibration value point security attribute is under unsafe condition, is stored the judgement in path where invocation point as dangerous path, So as to further improve detection efficiency.
Fig. 4 is the structure diagram of the parallel acquisition device in a kind of dangerous path that the embodiment of the present invention three provides.
As shown in figure 4, the parallel acquisition device in the danger path includes:
Preprocessing module 10 for the controlling stream graph of acquisition to be pre-processed, obtains y-bend controlling stream graph;
Coding module 20 for carrying out two Coded of parallel route to the y-bend controlling stream graph, obtains the y-bend control Two Coded of path on each vertex in flow graph processed;According to the corresponding multiple definite value points of preset multiple invocation points and each invocation point Vertex information on the y-bend controlling stream graph, and determine the road of each invocation point and the corresponding multiple definite value points of each invocation point Two Coded of diameter;
Dangerous path acquisition module 30, for the path according to the corresponding multiple definite value points of each invocation point and each invocation point Two Codeds, determine the target definite value point of each invocation point parallel, and determine the target definite value using the target definite value point Whether the path where the corresponding invocation point of point is dangerous path;Wherein, the target definite value point is corresponding more from invocation point It is determined in a definite value point.
In wherein a kind of optional embodiment, danger path acquisition module 30 is specifically used for:
A thread is distributed for each invocation point, according to two Codeds of the multiple definite value point, selected distance reference The nearest definite value point of point is as target definite value point.
In wherein a kind of optional embodiment, danger path acquisition module 30 is specifically used for:
Determine the security attribute of the target definite value point;
If the security attribute of the target definite value point is dangerous, by the invocation point institute corresponding to the target definite value point Path, extract and be stored in dangerous set of paths as dangerous path.
In wherein a kind of optional embodiment, the coding module 20 is specifically used for:
Piecemeal is carried out to the y-bend controlling stream graph, two lacing of path is carried out to the y-bend controlling stream graph of each piecemeal parallel Code, obtains two Coded of path on each vertex in the y-bend controlling stream graph of each piecemeal, the path two on whole vertex of acquisition Coded is then two Coded of path on each vertex in y-bend controlling stream graph.
In wherein a kind of optional embodiment, the preprocessing module 10 is specifically used for:
It carries out decyclization processing, digitized processing and stipulations to the controlling stream graph successively to handle, to obtain the y-bend Controlling stream graph.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description Specific work process and corresponding advantageous effect, can refer to preceding method embodiment in corresponding process, herein no longer It repeats.
The embodiment of the present invention three provide dangerous path parallel acquisition device, by using by the controlling stream graph obtained into Row pretreatment, obtains y-bend controlling stream graph;Two Coded of parallel route is carried out to the y-bend controlling stream graph, obtains the y-bend Two Coded of path on each vertex in controlling stream graph;According to preset multiple invocation points and the corresponding multiple definite values of each invocation point Vertex information of the point on the y-bend controlling stream graph determines the road of each invocation point and the corresponding multiple definite value points of each invocation point Two Coded of diameter;It is parallel to determine often according to two Coded of path of the corresponding multiple definite value points of each invocation point and each invocation point The target definite value point of a invocation point, and where determining the corresponding invocation point of the target definite value point using the target definite value point Path whether be dangerous path technical solution, so as to by the simplification of path structure relationship in controlling stream graph and to multiple Whether path where invocation point is the parallel judgement in dangerous path, and then in the case where ensureing accuracy in detection, effectively carry High detection efficiency.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above-mentioned each method embodiment can lead to The relevant hardware of program instruction is crossed to complete.Aforementioned program can be stored in a computer read/write memory medium.The journey Sequence when being executed, performs the step of including above-mentioned each method embodiment;And aforementioned storage medium includes:ROM, RAM, magnetic disc or The various media that can store program code such as person's CD.
Finally it should be noted that:The above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent Pipe is described in detail the present invention with reference to foregoing embodiments, it will be understood by those of ordinary skill in the art that:Its according to Can so modify to the technical solution recorded in foregoing embodiments either to which part or all technical features into Row equivalent replacement;And these modifications or replacement, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution The range of scheme.

Claims (10)

1. a kind of parallel acquisition methods in danger path, which is characterized in that including:
The controlling stream graph of acquisition is pre-processed, obtains y-bend controlling stream graph;
Two Coded of parallel route is carried out to the y-bend controlling stream graph, obtains the path on each vertex in the y-bend controlling stream graph Two Codeds;
According to top of the corresponding multiple definite value points of preset multiple invocation points and each invocation point on the y-bend controlling stream graph Point information determines two Coded of path of each invocation point and the corresponding multiple definite value points of each invocation point;
According to two Coded of path of the corresponding multiple definite value points of each invocation point and each invocation point, each invocation point is determined parallel Target definite value point, and whether determine using the target definite value point path where the corresponding invocation point of the target definite value point For dangerous path;Wherein, the target definite value point is determined from the corresponding multiple definite value points of invocation point.
2. the parallel acquisition methods in danger path according to claim 1, which is characterized in that it is described according to each invocation point and Two Coded of path of the corresponding multiple definite value points of each invocation point determines the target definite value point of each invocation point parallel, including:
A thread is distributed for each invocation point, according to two Codeds of the multiple definite value point, selected distance invocation point is most Nearly definite value point is as target definite value point.
3. the parallel acquisition methods in danger path according to claim 1, which is characterized in that described to be determined using the target Whether the path where value point determines the corresponding invocation point of the target definite value point is dangerous path, including:
Determine the security attribute of the target definite value point;
If the security attribute of the target definite value point is dangerous, will be where the invocation point corresponding to the target definite value point Path extracts as dangerous path and is stored in dangerous set of paths.
4. the parallel acquisition methods in danger path according to claim 1, which is characterized in that described to control the y-bend Flow graph carries out two Coded of parallel route, obtains two Coded of path on each vertex in the y-bend controlling stream graph, including:
Piecemeal is carried out to the y-bend controlling stream graph, two Coded of path is carried out to the y-bend controlling stream graph of each piecemeal parallel, Obtain two Coded of path on each vertex in the y-bend controlling stream graph of each piecemeal, two lacing of path on whole vertex of acquisition Code is then two Coded of path on each vertex in y-bend controlling stream graph.
5. according to the parallel acquisition methods in claim 1-4 any one of them danger path, which is characterized in that described to obtain Controlling stream graph pre-processed, obtain y-bend controlling stream graph, including:
Decyclization processing, digitized processing and stipulations are carried out to the controlling stream graph to handle, controlled with obtaining the y-bend successively Flow graph.
6. a kind of parallel acquisition device in danger path, which is characterized in that including:
Preprocessing module for the controlling stream graph of acquisition to be pre-processed, obtains y-bend controlling stream graph;
Coding module for carrying out two Coded of parallel route to the y-bend controlling stream graph, obtains the y-bend controlling stream graph In each vertex two Coded of path;According to the corresponding multiple definite value points of preset multiple invocation points and each invocation point described Vertex information on y-bend controlling stream graph determines two lacing of path of each invocation point and the corresponding multiple definite value points of each invocation point Code;
Dangerous path acquisition module, for two lacing of path according to the corresponding multiple definite value points of each invocation point and each invocation point Code determines the target definite value point of each invocation point, and determines that the target definite value point corresponds to using the target definite value point parallel Invocation point where path whether be dangerous path;Wherein, the target definite value point is multiple definite values corresponding from invocation point It is determined in point.
7. the parallel acquisition device in danger path according to claim 6, which is characterized in that the danger path obtains mould Block is specifically used for:
A thread is distributed for each invocation point, according to two Codeds of the multiple definite value point, selected distance invocation point is most Nearly definite value point is as target definite value point.
8. the parallel acquisition device in danger path according to claim 6, which is characterized in that the danger path obtains mould Block is specifically used for:
Determine the security attribute of the target definite value point;
If the security attribute of the target definite value point is dangerous, will be where the invocation point corresponding to the target definite value point Path extracts as dangerous path and is stored in dangerous set of paths.
9. the parallel acquisition device in danger path according to claim 6, which is characterized in that the coding module, specifically For:
Piecemeal is carried out to the y-bend controlling stream graph, two Coded of path is carried out to the y-bend controlling stream graph of each piecemeal parallel, Obtain two Coded of path on each vertex in the y-bend controlling stream graph of each piecemeal, two lacing of path on whole vertex of acquisition Code is then two Coded of path on each vertex in y-bend controlling stream graph.
10. according to the parallel acquisition device in claim 6-9 any one of them danger path, which is characterized in that the pre- place Module is managed, is specifically used for:
Decyclization processing, digitized processing and stipulations are carried out to the controlling stream graph to handle, controlled with obtaining the y-bend successively Flow graph.
CN201711435666.XA 2017-12-26 2017-12-26 The parallel acquisition methods and device in dangerous path Pending CN108170434A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711435666.XA CN108170434A (en) 2017-12-26 2017-12-26 The parallel acquisition methods and device in dangerous path

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711435666.XA CN108170434A (en) 2017-12-26 2017-12-26 The parallel acquisition methods and device in dangerous path

Publications (1)

Publication Number Publication Date
CN108170434A true CN108170434A (en) 2018-06-15

Family

ID=62521539

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711435666.XA Pending CN108170434A (en) 2017-12-26 2017-12-26 The parallel acquisition methods and device in dangerous path

Country Status (1)

Country Link
CN (1) CN108170434A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567200A (en) * 2011-12-14 2012-07-11 北京航空航天大学 Parallelization security hole detecting method based on function call graph
US20130305021A1 (en) * 2012-05-09 2013-11-14 Vinod Grover Method for convergence analysis based on thread variance analysis
CN106257425A (en) * 2016-07-20 2016-12-28 东南大学 A kind of Java concurrent program path based on con current control flow graph method for decomposing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567200A (en) * 2011-12-14 2012-07-11 北京航空航天大学 Parallelization security hole detecting method based on function call graph
US20130305021A1 (en) * 2012-05-09 2013-11-14 Vinod Grover Method for convergence analysis based on thread variance analysis
CN106257425A (en) * 2016-07-20 2016-12-28 东南大学 A kind of Java concurrent program path based on con current control flow graph method for decomposing

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
朱敬茹 等: "一种基于GPU 的危险路径并行提取方法", 《小型微型计算机系统》 *

Similar Documents

Publication Publication Date Title
David et al. Timed continuous petri nets
CN108801273B (en) Method and device for generating road reference line
CN107844415B (en) Model detection path reduction method based on interpolation and computer
CN104641351B (en) Part vectorization compiling system
CN106022107A (en) Method and system for protecting program execution integrity
CN105531672A (en) Parser generation
CN106716348A (en) Shared resources in a data processing appartus for executing a plurality of threads
CN108021507A (en) The parallel route searching method and device of semiology analysis
EP2234031A1 (en) Obfuscation
CN105446757B (en) A kind of processing method and equipment of data packet
CN112529579A (en) Information flow analysis method, system and platform based on block chain and mobile internet
CN111045670B (en) Method and device for identifying multiplexing relationship between binary code and source code
CN109324959A (en) A kind of method, server and the computer readable storage medium of automatic transfer data
CN103778062A (en) Multi-interrupt routine data access conflict detection method based on abstract interpretation
CN108170434A (en) The parallel acquisition methods and device in dangerous path
CN116976542B (en) Optimization method and system for automatic logistics sorting path
CN110347570A (en) A kind of Code automatic build tool analysis method under IDE environment
CN106681837A (en) Data sheet based data eliminating method and device
CN108469987A (en) It is a kind of that system is verified based on the interruption for interrupting controlling stream graph
CN108459963A (en) A kind of interruption verification method based on interruption controlling stream graph
CN110706108A (en) Method and apparatus for concurrently executing transactions in a blockchain
CN109656641A (en) A kind of operating system and method for multilayer circulation program
Schuppan Liveness checking as safety checking to find shortest counterexamples to linear time properties
CN106776746A (en) A kind of creation method and device of full-text index data
CN107221067A (en) A kind of serial number access control method and system

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180615