repo stringlengths 7 54 | path stringlengths 4 223 | func_name stringlengths 1 134 | original_string stringlengths 75 104k | language stringclasses 1
value | code stringlengths 75 104k | code_tokens listlengths 20 28.4k | docstring stringlengths 1 46.3k | docstring_tokens listlengths 1 1.66k | sha stringlengths 40 40 | url stringlengths 87 315 | partition stringclasses 1
value | summary stringlengths 4 350 | obf_code stringlengths 7.85k 764k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
angr/angr | angr/utils/graph.py | shallow_reverse | def shallow_reverse(g):
"""
Make a shallow copy of a directional graph and reverse the edges. This is a workaround to solve the issue that one
cannot easily make a shallow reversed copy of a graph in NetworkX 2, since networkx.reverse(copy=False) now returns
a GraphView, and GraphViews are always read-o... | python | def shallow_reverse(g):
"""
Make a shallow copy of a directional graph and reverse the edges. This is a workaround to solve the issue that one
cannot easily make a shallow reversed copy of a graph in NetworkX 2, since networkx.reverse(copy=False) now returns
a GraphView, and GraphViews are always read-o... | [
"def",
"shallow_reverse",
"(",
"g",
")",
":",
"new_g",
"=",
"networkx",
".",
"DiGraph",
"(",
")",
"new_g",
".",
"add_nodes_from",
"(",
"g",
".",
"nodes",
"(",
")",
")",
"for",
"src",
",",
"dst",
",",
"data",
"in",
"g",
".",
"edges",
"(",
"data",
... | Make a shallow copy of a directional graph and reverse the edges. This is a workaround to solve the issue that one
cannot easily make a shallow reversed copy of a graph in NetworkX 2, since networkx.reverse(copy=False) now returns
a GraphView, and GraphViews are always read-only.
:param networkx.DiGraph g:... | [
"Make",
"a",
"shallow",
"copy",
"of",
"a",
"directional",
"graph",
"and",
"reverse",
"the",
"edges",
".",
"This",
"is",
"a",
"workaround",
"to",
"solve",
"the",
"issue",
"that",
"one",
"cannot",
"easily",
"make",
"a",
"shallow",
"reversed",
"copy",
"of",
... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/utils/graph.py#L8-L25 | train | Make a shallow copy of a graph and reverse the edges. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/utils/graph.py | dfs_back_edges | def dfs_back_edges(graph, start_node):
"""
Do a DFS traversal of the graph, and return with the back edges.
Note: This is just a naive recursive implementation, feel free to replace it.
I couldn't find anything in networkx to do this functionality. Although the
name suggest it, but `dfs_labeled_edg... | python | def dfs_back_edges(graph, start_node):
"""
Do a DFS traversal of the graph, and return with the back edges.
Note: This is just a naive recursive implementation, feel free to replace it.
I couldn't find anything in networkx to do this functionality. Although the
name suggest it, but `dfs_labeled_edg... | [
"def",
"dfs_back_edges",
"(",
"graph",
",",
"start_node",
")",
":",
"visited",
"=",
"set",
"(",
")",
"finished",
"=",
"set",
"(",
")",
"def",
"_dfs_back_edges_core",
"(",
"node",
")",
":",
"visited",
".",
"add",
"(",
"node",
")",
"for",
"child",
"in",
... | Do a DFS traversal of the graph, and return with the back edges.
Note: This is just a naive recursive implementation, feel free to replace it.
I couldn't find anything in networkx to do this functionality. Although the
name suggest it, but `dfs_labeled_edges` is doing something different.
:param graph... | [
"Do",
"a",
"DFS",
"traversal",
"of",
"the",
"graph",
"and",
"return",
"with",
"the",
"back",
"edges",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/utils/graph.py#L28-L56 | train | Do a DFS traversal of the graph and return with the back edges. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/utils/graph.py | compute_dominance_frontier | def compute_dominance_frontier(graph, domtree):
"""
Compute a dominance frontier based on the given post-dominator tree.
This implementation is based on figure 2 of paper An Efficient Method of Computing Static Single Assignment
Form by Ron Cytron, etc.
:param graph: The graph where we want to c... | python | def compute_dominance_frontier(graph, domtree):
"""
Compute a dominance frontier based on the given post-dominator tree.
This implementation is based on figure 2 of paper An Efficient Method of Computing Static Single Assignment
Form by Ron Cytron, etc.
:param graph: The graph where we want to c... | [
"def",
"compute_dominance_frontier",
"(",
"graph",
",",
"domtree",
")",
":",
"df",
"=",
"{",
"}",
"# Perform a post-order search on the dominator tree",
"for",
"x",
"in",
"networkx",
".",
"dfs_postorder_nodes",
"(",
"domtree",
")",
":",
"if",
"x",
"not",
"in",
"... | Compute a dominance frontier based on the given post-dominator tree.
This implementation is based on figure 2 of paper An Efficient Method of Computing Static Single Assignment
Form by Ron Cytron, etc.
:param graph: The graph where we want to compute the dominance frontier.
:param domtree: The domin... | [
"Compute",
"a",
"dominance",
"frontier",
"based",
"on",
"the",
"given",
"post",
"-",
"dominator",
"tree",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/utils/graph.py#L63-L104 | train | Compute a dominance frontier based on the given post - dominator tree. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/utils/graph.py | Dominators._graph_successors | def _graph_successors(self, graph, node):
"""
Return the successors of a node in the graph.
This method can be overriden in case there are special requirements with the graph and the successors. For
example, when we are dealing with a control flow graph, we may not want to get the FakeRe... | python | def _graph_successors(self, graph, node):
"""
Return the successors of a node in the graph.
This method can be overriden in case there are special requirements with the graph and the successors. For
example, when we are dealing with a control flow graph, we may not want to get the FakeRe... | [
"def",
"_graph_successors",
"(",
"self",
",",
"graph",
",",
"node",
")",
":",
"if",
"self",
".",
"_graph_successors_func",
"is",
"not",
"None",
":",
"return",
"self",
".",
"_graph_successors_func",
"(",
"graph",
",",
"node",
")",
"return",
"graph",
".",
"s... | Return the successors of a node in the graph.
This method can be overriden in case there are special requirements with the graph and the successors. For
example, when we are dealing with a control flow graph, we may not want to get the FakeRet successors.
:param graph: The graph.
:param... | [
"Return",
"the",
"successors",
"of",
"a",
"node",
"in",
"the",
"graph",
".",
"This",
"method",
"can",
"be",
"overriden",
"in",
"case",
"there",
"are",
"special",
"requirements",
"with",
"the",
"graph",
"and",
"the",
"successors",
".",
"For",
"example",
"wh... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/utils/graph.py#L186-L201 | train | Returns the successors of a node in the graph. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/utils/graph.py | Dominators._construct | def _construct(self, graph, entry_node):
"""
Find post-dominators for each node in the graph.
This implementation is based on paper A Fast Algorithm for Finding Dominators in a Flow Graph by Thomas
Lengauer and Robert E. Tarjan from Stanford University, ACM Transactions on Programming L... | python | def _construct(self, graph, entry_node):
"""
Find post-dominators for each node in the graph.
This implementation is based on paper A Fast Algorithm for Finding Dominators in a Flow Graph by Thomas
Lengauer and Robert E. Tarjan from Stanford University, ACM Transactions on Programming L... | [
"def",
"_construct",
"(",
"self",
",",
"graph",
",",
"entry_node",
")",
":",
"# Step 1",
"_prepared_graph",
",",
"vertices",
",",
"parent",
"=",
"self",
".",
"_prepare_graph",
"(",
"graph",
",",
"entry_node",
")",
"# vertices is a list of ContainerNode instances",
... | Find post-dominators for each node in the graph.
This implementation is based on paper A Fast Algorithm for Finding Dominators in a Flow Graph by Thomas
Lengauer and Robert E. Tarjan from Stanford University, ACM Transactions on Programming Languages and Systems,
Vol. 1, No. 1, July 1979 | [
"Find",
"post",
"-",
"dominators",
"for",
"each",
"node",
"in",
"the",
"graph",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/utils/graph.py#L203-L264 | train | This method is used to construct the internal structure of the internal structure of the internal structure. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/misc/loggers.py | Loggers.load_all_loggers | def load_all_loggers(self):
"""
A dumb and simple way to conveniently aggregate all loggers.
Adds attributes to this instance of each registered logger, replacing '.' with '_'
"""
for name, logger in logging.Logger.manager.loggerDict.items():
if any(name.startswith(x... | python | def load_all_loggers(self):
"""
A dumb and simple way to conveniently aggregate all loggers.
Adds attributes to this instance of each registered logger, replacing '.' with '_'
"""
for name, logger in logging.Logger.manager.loggerDict.items():
if any(name.startswith(x... | [
"def",
"load_all_loggers",
"(",
"self",
")",
":",
"for",
"name",
",",
"logger",
"in",
"logging",
".",
"Logger",
".",
"manager",
".",
"loggerDict",
".",
"items",
"(",
")",
":",
"if",
"any",
"(",
"name",
".",
"startswith",
"(",
"x",
"+",
"'.'",
")",
... | A dumb and simple way to conveniently aggregate all loggers.
Adds attributes to this instance of each registered logger, replacing '.' with '_' | [
"A",
"dumb",
"and",
"simple",
"way",
"to",
"conveniently",
"aggregate",
"all",
"loggers",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/misc/loggers.py#L20-L28 | train | A simple way to aggregate all loggers. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/engines/procedure.py | SimEngineProcedure.process | def process(self, state, procedure,
ret_to=None,
inline=None,
force_addr=None,
**kwargs):
"""
Perform execution with a state.
:param state: The state with which to execute
:param procedure: An instance of a SimProcedure to run
... | python | def process(self, state, procedure,
ret_to=None,
inline=None,
force_addr=None,
**kwargs):
"""
Perform execution with a state.
:param state: The state with which to execute
:param procedure: An instance of a SimProcedure to run
... | [
"def",
"process",
"(",
"self",
",",
"state",
",",
"procedure",
",",
"ret_to",
"=",
"None",
",",
"inline",
"=",
"None",
",",
"force_addr",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"super",
"(",
"SimEngineProcedure",
",",
"self",
")",
... | Perform execution with a state.
:param state: The state with which to execute
:param procedure: An instance of a SimProcedure to run
:param ret_to: The address to return to when this procedure is finished
:param inline: This is an inline execution. Do not bother copyin... | [
"Perform",
"execution",
"with",
"a",
"state",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/engines/procedure.py#L13-L31 | train | This method is called by the SimEngineProcedure class when the state is executed. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/engines/soot/values/arrayref.py | SimSootValue_ArrayBaseRef.get_default_value | def get_default_value(self, state):
"""
:return: Default value for array elements.
"""
if self._default_value_generator:
return self._default_value_generator(state)
else:
return state.project.simos.get_default_value_by_type(self.element_type, state=state) | python | def get_default_value(self, state):
"""
:return: Default value for array elements.
"""
if self._default_value_generator:
return self._default_value_generator(state)
else:
return state.project.simos.get_default_value_by_type(self.element_type, state=state) | [
"def",
"get_default_value",
"(",
"self",
",",
"state",
")",
":",
"if",
"self",
".",
"_default_value_generator",
":",
"return",
"self",
".",
"_default_value_generator",
"(",
"state",
")",
"else",
":",
"return",
"state",
".",
"project",
".",
"simos",
".",
"get... | :return: Default value for array elements. | [
":",
"return",
":",
"Default",
"value",
"for",
"array",
"elements",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/engines/soot/values/arrayref.py#L26-L33 | train | Get the default value for the array elements. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/cfg/cfb.py | CFBlanket.add_function | def add_function(self, func):
"""
Add a function `func` and all blocks of this function to the blanket.
"""
for block in func.blocks:
self.add_obj(block.addr, block) | python | def add_function(self, func):
"""
Add a function `func` and all blocks of this function to the blanket.
"""
for block in func.blocks:
self.add_obj(block.addr, block) | [
"def",
"add_function",
"(",
"self",
",",
"func",
")",
":",
"for",
"block",
"in",
"func",
".",
"blocks",
":",
"self",
".",
"add_obj",
"(",
"block",
".",
"addr",
",",
"block",
")"
] | Add a function `func` and all blocks of this function to the blanket. | [
"Add",
"a",
"function",
"func",
"and",
"all",
"blocks",
"of",
"this",
"function",
"to",
"the",
"blanket",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfb.py#L174-L179 | train | Add a function to the blanket. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/cfg/cfb.py | CFBlanket.dbg_repr | def dbg_repr(self):
"""
The debugging representation of this CFBlanket.
:return: The debugging representation of this CFBlanket.
:rtype: str
"""
output = [ ]
for obj in self.project.loader.all_objects:
for section in obj.sections:
... | python | def dbg_repr(self):
"""
The debugging representation of this CFBlanket.
:return: The debugging representation of this CFBlanket.
:rtype: str
"""
output = [ ]
for obj in self.project.loader.all_objects:
for section in obj.sections:
... | [
"def",
"dbg_repr",
"(",
"self",
")",
":",
"output",
"=",
"[",
"]",
"for",
"obj",
"in",
"self",
".",
"project",
".",
"loader",
".",
"all_objects",
":",
"for",
"section",
"in",
"obj",
".",
"sections",
":",
"if",
"section",
".",
"memsize",
"==",
"0",
... | The debugging representation of this CFBlanket.
:return: The debugging representation of this CFBlanket.
:rtype: str | [
"The",
"debugging",
"representation",
"of",
"this",
"CFBlanket",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfb.py#L181-L212 | train | Returns a string representation of this CFBlanket. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/cfg/cfb.py | CFBlanket._from_cfg | def _from_cfg(self, cfg):
"""
Initialize CFBlanket from a CFG instance.
:param cfg: A CFG instance.
:return: None
"""
# Let's first add all functions first
for func in cfg.kb.functions.values():
self.add_function(func)
self._mark_unknowns... | python | def _from_cfg(self, cfg):
"""
Initialize CFBlanket from a CFG instance.
:param cfg: A CFG instance.
:return: None
"""
# Let's first add all functions first
for func in cfg.kb.functions.values():
self.add_function(func)
self._mark_unknowns... | [
"def",
"_from_cfg",
"(",
"self",
",",
"cfg",
")",
":",
"# Let's first add all functions first",
"for",
"func",
"in",
"cfg",
".",
"kb",
".",
"functions",
".",
"values",
"(",
")",
":",
"self",
".",
"add_function",
"(",
"func",
")",
"self",
".",
"_mark_unknow... | Initialize CFBlanket from a CFG instance.
:param cfg: A CFG instance.
:return: None | [
"Initialize",
"CFBlanket",
"from",
"a",
"CFG",
"instance",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfb.py#L214-L226 | train | Initialize CFBlanket from a CFG instance. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/cfg/cfb.py | CFBlanket._mark_unknowns | def _mark_unknowns(self):
"""
Mark all unmapped regions.
:return: None
"""
for obj in self.project.loader.all_objects:
if isinstance(obj, cle.ELF):
# sections?
if obj.sections:
for section in obj.sections:
... | python | def _mark_unknowns(self):
"""
Mark all unmapped regions.
:return: None
"""
for obj in self.project.loader.all_objects:
if isinstance(obj, cle.ELF):
# sections?
if obj.sections:
for section in obj.sections:
... | [
"def",
"_mark_unknowns",
"(",
"self",
")",
":",
"for",
"obj",
"in",
"self",
".",
"project",
".",
"loader",
".",
"all_objects",
":",
"if",
"isinstance",
"(",
"obj",
",",
"cle",
".",
"ELF",
")",
":",
"# sections?",
"if",
"obj",
".",
"sections",
":",
"f... | Mark all unmapped regions.
:return: None | [
"Mark",
"all",
"unmapped",
"regions",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfb.py#L228-L265 | train | Mark all unmapped regions. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/simos/cgc.py | SimCGC.state_blank | def state_blank(self, flag_page=None, **kwargs):
"""
:param flag_page: Flag page content, either a string or a list of BV8s
"""
s = super(SimCGC, self).state_blank(**kwargs) # pylint:disable=invalid-name
# Special stack base for CGC binaries to work with Shellphish CRS
... | python | def state_blank(self, flag_page=None, **kwargs):
"""
:param flag_page: Flag page content, either a string or a list of BV8s
"""
s = super(SimCGC, self).state_blank(**kwargs) # pylint:disable=invalid-name
# Special stack base for CGC binaries to work with Shellphish CRS
... | [
"def",
"state_blank",
"(",
"self",
",",
"flag_page",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"s",
"=",
"super",
"(",
"SimCGC",
",",
"self",
")",
".",
"state_blank",
"(",
"*",
"*",
"kwargs",
")",
"# pylint:disable=invalid-name",
"# Special stack bas... | :param flag_page: Flag page content, either a string or a list of BV8s | [
":",
"param",
"flag_page",
":",
"Flag",
"page",
"content",
"either",
"a",
"string",
"or",
"a",
"list",
"of",
"BV8s"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/simos/cgc.py#L29-L68 | train | Create a SimState object with the CGC state blanking all of the state information. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/loop_analysis.py | SootBlockProcessor._stmt_inside_loop | def _stmt_inside_loop(self, stmt_idx):
"""
Test whether a statement is inside the loop body or not.
:param stmt_idx:
:return:
"""
# TODO: This is slow. Fix the performance issue
for node in self.loop.body_nodes:
if node.addr.stmt_idx <= stmt_idx < n... | python | def _stmt_inside_loop(self, stmt_idx):
"""
Test whether a statement is inside the loop body or not.
:param stmt_idx:
:return:
"""
# TODO: This is slow. Fix the performance issue
for node in self.loop.body_nodes:
if node.addr.stmt_idx <= stmt_idx < n... | [
"def",
"_stmt_inside_loop",
"(",
"self",
",",
"stmt_idx",
")",
":",
"# TODO: This is slow. Fix the performance issue",
"for",
"node",
"in",
"self",
".",
"loop",
".",
"body_nodes",
":",
"if",
"node",
".",
"addr",
".",
"stmt_idx",
"<=",
"stmt_idx",
"<",
"node",
... | Test whether a statement is inside the loop body or not.
:param stmt_idx:
:return: | [
"Test",
"whether",
"a",
"statement",
"is",
"inside",
"the",
"loop",
"body",
"or",
"not",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/loop_analysis.py#L85-L98 | train | Test whether a statement is inside the loop body or not. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/loop_analysis.py | LoopAnalysis._is_bounded_iterator_based | def _is_bounded_iterator_based(self):
"""
Iterator based check.
With respect to a certain variable/value A,
- there must be at least one exit condition being A//Iterator//HasNext == 0
- there must be at least one local that ticks the iterator next: A//Iterator//Next
"""
... | python | def _is_bounded_iterator_based(self):
"""
Iterator based check.
With respect to a certain variable/value A,
- there must be at least one exit condition being A//Iterator//HasNext == 0
- there must be at least one local that ticks the iterator next: A//Iterator//Next
"""
... | [
"def",
"_is_bounded_iterator_based",
"(",
"self",
")",
":",
"# Condition 0",
"check_0",
"=",
"lambda",
"cond",
":",
"(",
"isinstance",
"(",
"cond",
",",
"Condition",
")",
"and",
"cond",
".",
"op",
"==",
"Condition",
".",
"Equal",
"and",
"cond",
".",
"val1"... | Iterator based check.
With respect to a certain variable/value A,
- there must be at least one exit condition being A//Iterator//HasNext == 0
- there must be at least one local that ticks the iterator next: A//Iterator//Next | [
"Iterator",
"based",
"check",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/loop_analysis.py#L329-L363 | train | Check if the iterator based check. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/reaching_definitions/reaching_definitions.py | LiveDefinitions.kill_definitions | def kill_definitions(self, atom, code_loc, data=None, dummy=True):
"""
Overwrite existing definitions w.r.t 'atom' with a dummy definition instance. A dummy definition will not be
removed during simplification.
:param Atom atom:
:param CodeLocation code_loc:
:param objec... | python | def kill_definitions(self, atom, code_loc, data=None, dummy=True):
"""
Overwrite existing definitions w.r.t 'atom' with a dummy definition instance. A dummy definition will not be
removed during simplification.
:param Atom atom:
:param CodeLocation code_loc:
:param objec... | [
"def",
"kill_definitions",
"(",
"self",
",",
"atom",
",",
"code_loc",
",",
"data",
"=",
"None",
",",
"dummy",
"=",
"True",
")",
":",
"if",
"data",
"is",
"None",
":",
"data",
"=",
"DataSet",
"(",
"Undefined",
"(",
"atom",
".",
"size",
")",
",",
"ato... | Overwrite existing definitions w.r.t 'atom' with a dummy definition instance. A dummy definition will not be
removed during simplification.
:param Atom atom:
:param CodeLocation code_loc:
:param object data:
:return: None | [
"Overwrite",
"existing",
"definitions",
"w",
".",
"r",
".",
"t",
"atom",
"with",
"a",
"dummy",
"definition",
"instance",
".",
"A",
"dummy",
"definition",
"will",
"not",
"be",
"removed",
"during",
"simplification",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/reaching_definitions/reaching_definitions.py#L149-L163 | train | Kill existing definitions w. r. t atom with a dummy definition instance. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/simos/javavm.py | SimJavaVM.state_entry | def state_entry(self, args=None, **kwargs): # pylint: disable=arguments-differ
"""
Create an entry state.
:param args: List of SootArgument values (optional).
"""
state = self.state_blank(**kwargs)
# for the Java main method `public static main(String[] args)`,
#... | python | def state_entry(self, args=None, **kwargs): # pylint: disable=arguments-differ
"""
Create an entry state.
:param args: List of SootArgument values (optional).
"""
state = self.state_blank(**kwargs)
# for the Java main method `public static main(String[] args)`,
#... | [
"def",
"state_entry",
"(",
"self",
",",
"args",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"# pylint: disable=arguments-differ",
"state",
"=",
"self",
".",
"state_blank",
"(",
"*",
"*",
"kwargs",
")",
"# for the Java main method `public static main(String[] arg... | Create an entry state.
:param args: List of SootArgument values (optional). | [
"Create",
"an",
"entry",
"state",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/simos/javavm.py#L161-L180 | train | Create an entry state. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/simos/javavm.py | SimJavaVM.generate_symbolic_cmd_line_arg | def generate_symbolic_cmd_line_arg(state, max_length=1000):
"""
Generates a new symbolic cmd line argument string.
:return: The string reference.
"""
str_ref = SimSootValue_StringRef(state.memory.get_new_uuid())
str_sym = StringS("cmd_line_arg", max_length)
state.... | python | def generate_symbolic_cmd_line_arg(state, max_length=1000):
"""
Generates a new symbolic cmd line argument string.
:return: The string reference.
"""
str_ref = SimSootValue_StringRef(state.memory.get_new_uuid())
str_sym = StringS("cmd_line_arg", max_length)
state.... | [
"def",
"generate_symbolic_cmd_line_arg",
"(",
"state",
",",
"max_length",
"=",
"1000",
")",
":",
"str_ref",
"=",
"SimSootValue_StringRef",
"(",
"state",
".",
"memory",
".",
"get_new_uuid",
"(",
")",
")",
"str_sym",
"=",
"StringS",
"(",
"\"cmd_line_arg\"",
",",
... | Generates a new symbolic cmd line argument string.
:return: The string reference. | [
"Generates",
"a",
"new",
"symbolic",
"cmd",
"line",
"argument",
"string",
".",
":",
"return",
":",
"The",
"string",
"reference",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/simos/javavm.py#L183-L192 | train | Generates a new symbolic cmd line argument string. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/simos/javavm.py | SimJavaVM.state_call | def state_call(self, addr, *args, **kwargs):
"""
Create a native or a Java call state.
:param addr: Soot or native addr of the invoke target.
:param args: List of SootArgument values.
"""
state = kwargs.pop('base_state', None)
# check if we need to setup a n... | python | def state_call(self, addr, *args, **kwargs):
"""
Create a native or a Java call state.
:param addr: Soot or native addr of the invoke target.
:param args: List of SootArgument values.
"""
state = kwargs.pop('base_state', None)
# check if we need to setup a n... | [
"def",
"state_call",
"(",
"self",
",",
"addr",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"state",
"=",
"kwargs",
".",
"pop",
"(",
"'base_state'",
",",
"None",
")",
"# check if we need to setup a native or a java callsite",
"if",
"isinstance",
"(",
... | Create a native or a Java call state.
:param addr: Soot or native addr of the invoke target.
:param args: List of SootArgument values. | [
"Create",
"a",
"native",
"or",
"a",
"Java",
"call",
"state",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/simos/javavm.py#L194-L258 | train | Create a native or java call state. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/simos/javavm.py | SimJavaVM.get_default_value_by_type | def get_default_value_by_type(type_, state=None):
"""
Java specify defaults values for primitive and reference types. This
method returns the default value for a given type.
:param str type_: Name of type.
:return: Default value for this type.
"""
if... | python | def get_default_value_by_type(type_, state=None):
"""
Java specify defaults values for primitive and reference types. This
method returns the default value for a given type.
:param str type_: Name of type.
:return: Default value for this type.
"""
if... | [
"def",
"get_default_value_by_type",
"(",
"type_",
",",
"state",
"=",
"None",
")",
":",
"if",
"type_",
"in",
"[",
"'byte'",
",",
"'char'",
",",
"'short'",
",",
"'int'",
",",
"'boolean'",
"]",
":",
"return",
"BVS",
"(",
"'default_value_{}'",
".",
"format",
... | Java specify defaults values for primitive and reference types. This
method returns the default value for a given type.
:param str type_: Name of type.
:return: Default value for this type. | [
"Java",
"specify",
"defaults",
"values",
"for",
"primitive",
"and",
"reference",
"types",
".",
"This",
"method",
"returns",
"the",
"default",
"value",
"for",
"a",
"given",
"type",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/simos/javavm.py#L265-L297 | train | This method returns the default value for a given type. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/simos/javavm.py | SimJavaVM.cast_primitive | def cast_primitive(state, value, to_type):
"""
Cast the value of primtive types.
:param value: Bitvector storing the primitive value.
:param to_type: Name of the targeted type.
:return: Resized value.
"""
if to_type in ['float', 'double']:
... | python | def cast_primitive(state, value, to_type):
"""
Cast the value of primtive types.
:param value: Bitvector storing the primitive value.
:param to_type: Name of the targeted type.
:return: Resized value.
"""
if to_type in ['float', 'double']:
... | [
"def",
"cast_primitive",
"(",
"state",
",",
"value",
",",
"to_type",
")",
":",
"if",
"to_type",
"in",
"[",
"'float'",
",",
"'double'",
"]",
":",
"if",
"value",
".",
"symbolic",
":",
"# TODO extend support for floating point types",
"l",
".",
"warning",
"(",
... | Cast the value of primtive types.
:param value: Bitvector storing the primitive value.
:param to_type: Name of the targeted type.
:return: Resized value. | [
"Cast",
"the",
"value",
"of",
"primtive",
"types",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/simos/javavm.py#L300-L339 | train | Cast the value of primtive types to the specified type. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/simos/javavm.py | SimJavaVM.init_static_field | def init_static_field(state, field_class_name, field_name, field_type):
"""
Initialize the static field with an allocated, but not initialized,
object of the given type.
:param state: State associated to the field.
:param field_class_name: Class containing the field.
:pa... | python | def init_static_field(state, field_class_name, field_name, field_type):
"""
Initialize the static field with an allocated, but not initialized,
object of the given type.
:param state: State associated to the field.
:param field_class_name: Class containing the field.
:pa... | [
"def",
"init_static_field",
"(",
"state",
",",
"field_class_name",
",",
"field_name",
",",
"field_type",
")",
":",
"field_ref",
"=",
"SimSootValue_StaticFieldRef",
".",
"get_ref",
"(",
"state",
",",
"field_class_name",
",",
"field_name",
",",
"field_type",
")",
"f... | Initialize the static field with an allocated, but not initialized,
object of the given type.
:param state: State associated to the field.
:param field_class_name: Class containing the field.
:param field_name: Name of the field.
:param field_type: Type of the field and the new ... | [
"Initialize",
"the",
"static",
"field",
"with",
"an",
"allocated",
"but",
"not",
"initialized",
"object",
"of",
"the",
"given",
"type",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/simos/javavm.py#L342-L355 | train | Initialize the static field with an allocated but not initialized object of the given type. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/simos/javavm.py | SimJavaVM.get_addr_of_native_method | def get_addr_of_native_method(self, soot_method):
"""
Get address of the implementation from a native declared Java function.
:param soot_method: Method descriptor of a native declared function.
:return: CLE address of the given method.
"""
for name, symbol in self.nativ... | python | def get_addr_of_native_method(self, soot_method):
"""
Get address of the implementation from a native declared Java function.
:param soot_method: Method descriptor of a native declared function.
:return: CLE address of the given method.
"""
for name, symbol in self.nativ... | [
"def",
"get_addr_of_native_method",
"(",
"self",
",",
"soot_method",
")",
":",
"for",
"name",
",",
"symbol",
"in",
"self",
".",
"native_symbols",
".",
"items",
"(",
")",
":",
"if",
"soot_method",
".",
"matches_with_native_name",
"(",
"native_method",
"=",
"nam... | Get address of the implementation from a native declared Java function.
:param soot_method: Method descriptor of a native declared function.
:return: CLE address of the given method. | [
"Get",
"address",
"of",
"the",
"implementation",
"from",
"a",
"native",
"declared",
"Java",
"function",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/simos/javavm.py#L373-L391 | train | Get the address of the implementation from a native declared Java function. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/simos/javavm.py | SimJavaVM.get_native_type | def get_native_type(self, java_type):
"""
Maps the Java type to a SimTypeReg representation of its native
counterpart. This type can be used to indicate the (well-defined) size
of native JNI types.
:return: A SymTypeReg with the JNI size of the given type.
"""
if... | python | def get_native_type(self, java_type):
"""
Maps the Java type to a SimTypeReg representation of its native
counterpart. This type can be used to indicate the (well-defined) size
of native JNI types.
:return: A SymTypeReg with the JNI size of the given type.
"""
if... | [
"def",
"get_native_type",
"(",
"self",
",",
"java_type",
")",
":",
"if",
"java_type",
"in",
"ArchSoot",
".",
"sizeof",
".",
"keys",
"(",
")",
":",
"jni_type_size",
"=",
"ArchSoot",
".",
"sizeof",
"[",
"java_type",
"]",
"else",
":",
"# if it's not a primitive... | Maps the Java type to a SimTypeReg representation of its native
counterpart. This type can be used to indicate the (well-defined) size
of native JNI types.
:return: A SymTypeReg with the JNI size of the given type. | [
"Maps",
"the",
"Java",
"type",
"to",
"a",
"SimTypeReg",
"representation",
"of",
"its",
"native",
"counterpart",
".",
"This",
"type",
"can",
"be",
"used",
"to",
"indicate",
"the",
"(",
"well",
"-",
"defined",
")",
"size",
"of",
"native",
"JNI",
"types",
"... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/simos/javavm.py#L393-L406 | train | Maps the Java type to a SimTypeReg representation of its native
. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/simos/javavm.py | SimJavaVM.get_native_cc | def get_native_cc(self, func_ty=None):
"""
:return: SimCC object for the native simos.
"""
native_cc_cls = DEFAULT_CC[self.native_simos.arch.name]
return native_cc_cls(self.native_simos.arch, func_ty=func_ty) | python | def get_native_cc(self, func_ty=None):
"""
:return: SimCC object for the native simos.
"""
native_cc_cls = DEFAULT_CC[self.native_simos.arch.name]
return native_cc_cls(self.native_simos.arch, func_ty=func_ty) | [
"def",
"get_native_cc",
"(",
"self",
",",
"func_ty",
"=",
"None",
")",
":",
"native_cc_cls",
"=",
"DEFAULT_CC",
"[",
"self",
".",
"native_simos",
".",
"arch",
".",
"name",
"]",
"return",
"native_cc_cls",
"(",
"self",
".",
"native_simos",
".",
"arch",
",",
... | :return: SimCC object for the native simos. | [
":",
"return",
":",
"SimCC",
"object",
"for",
"the",
"native",
"simos",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/simos/javavm.py#L415-L420 | train | Returns the SimCC object for the native simos.
. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/procedures/win32/sim_time.py | GetLocalTime.fill_symbolic | def fill_symbolic(self):
"""
Fill the class with constrained symbolic values.
"""
self.wYear = self.state.solver.BVS('cur_year', 16, key=('api', 'GetLocalTime', 'cur_year'))
self.wMonth = self.state.solver.BVS('cur_month', 16, key=('api', 'GetLocalTime', 'cur_month'))
sel... | python | def fill_symbolic(self):
"""
Fill the class with constrained symbolic values.
"""
self.wYear = self.state.solver.BVS('cur_year', 16, key=('api', 'GetLocalTime', 'cur_year'))
self.wMonth = self.state.solver.BVS('cur_month', 16, key=('api', 'GetLocalTime', 'cur_month'))
sel... | [
"def",
"fill_symbolic",
"(",
"self",
")",
":",
"self",
".",
"wYear",
"=",
"self",
".",
"state",
".",
"solver",
".",
"BVS",
"(",
"'cur_year'",
",",
"16",
",",
"key",
"=",
"(",
"'api'",
",",
"'GetLocalTime'",
",",
"'cur_year'",
")",
")",
"self",
".",
... | Fill the class with constrained symbolic values. | [
"Fill",
"the",
"class",
"with",
"constrained",
"symbolic",
"values",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/procedures/win32/sim_time.py#L61-L84 | train | Fill the class with constrained symbolic values. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/procedures/win32/sim_time.py | GetLocalTime.fill_from_timestamp | def fill_from_timestamp(self, ts):
"""
Fill the class with the appropriate values extracted from the given timestamp.
:param ts: A POSIX timestamp.
"""
dt = datetime.datetime.fromtimestamp(ts)
self.wYear = dt.year
self.wMonth = dt.month
self.wDayOfWeek =... | python | def fill_from_timestamp(self, ts):
"""
Fill the class with the appropriate values extracted from the given timestamp.
:param ts: A POSIX timestamp.
"""
dt = datetime.datetime.fromtimestamp(ts)
self.wYear = dt.year
self.wMonth = dt.month
self.wDayOfWeek =... | [
"def",
"fill_from_timestamp",
"(",
"self",
",",
"ts",
")",
":",
"dt",
"=",
"datetime",
".",
"datetime",
".",
"fromtimestamp",
"(",
"ts",
")",
"self",
".",
"wYear",
"=",
"dt",
".",
"year",
"self",
".",
"wMonth",
"=",
"dt",
".",
"month",
"self",
".",
... | Fill the class with the appropriate values extracted from the given timestamp.
:param ts: A POSIX timestamp. | [
"Fill",
"the",
"class",
"with",
"the",
"appropriate",
"values",
"extracted",
"from",
"the",
"given",
"timestamp",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/procedures/win32/sim_time.py#L86-L100 | train | Fill the class with the appropriate values extracted from the given timestamp. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/annocfg.py | AnnotatedCFG.from_digraph | def from_digraph(self, digraph):
"""
Initialize this AnnotatedCFG object with a networkx.DiGraph consisting of the following
form of nodes:
Tuples like (block address, statement ID)
Those nodes are connected by edges indicating the execution flow.
:param networkx.DiGra... | python | def from_digraph(self, digraph):
"""
Initialize this AnnotatedCFG object with a networkx.DiGraph consisting of the following
form of nodes:
Tuples like (block address, statement ID)
Those nodes are connected by edges indicating the execution flow.
:param networkx.DiGra... | [
"def",
"from_digraph",
"(",
"self",
",",
"digraph",
")",
":",
"for",
"n1",
"in",
"digraph",
".",
"nodes",
"(",
")",
":",
"addr1",
",",
"stmt_idx1",
"=",
"n1",
"self",
".",
"add_statements_to_whitelist",
"(",
"addr1",
",",
"(",
"stmt_idx1",
",",
")",
")... | Initialize this AnnotatedCFG object with a networkx.DiGraph consisting of the following
form of nodes:
Tuples like (block address, statement ID)
Those nodes are connected by edges indicating the execution flow.
:param networkx.DiGraph digraph: A networkx.DiGraph object | [
"Initialize",
"this",
"AnnotatedCFG",
"object",
"with",
"a",
"networkx",
".",
"DiGraph",
"consisting",
"of",
"the",
"following",
"form",
"of",
"nodes",
":"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/annocfg.py#L49-L73 | train | Initialize this AnnotatedCFG object from a networkx. DiGraph. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/annocfg.py | AnnotatedCFG.get_whitelisted_statements | def get_whitelisted_statements(self, addr):
"""
:returns: True if all statements are whitelisted
"""
if addr in self._run_statement_whitelist:
if self._run_statement_whitelist[addr] is True:
return None # This is the default value used to say
... | python | def get_whitelisted_statements(self, addr):
"""
:returns: True if all statements are whitelisted
"""
if addr in self._run_statement_whitelist:
if self._run_statement_whitelist[addr] is True:
return None # This is the default value used to say
... | [
"def",
"get_whitelisted_statements",
"(",
"self",
",",
"addr",
")",
":",
"if",
"addr",
"in",
"self",
".",
"_run_statement_whitelist",
":",
"if",
"self",
".",
"_run_statement_whitelist",
"[",
"addr",
"]",
"is",
"True",
":",
"return",
"None",
"# This is the defaul... | :returns: True if all statements are whitelisted | [
":",
"returns",
":",
"True",
"if",
"all",
"statements",
"are",
"whitelisted"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/annocfg.py#L140-L154 | train | Returns a list of statements that are whitelisted for the given address. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/annocfg.py | AnnotatedCFG.dbg_print_irsb | def dbg_print_irsb(self, irsb_addr, project=None):
"""
Pretty-print an IRSB with whitelist information
"""
if project is None:
project = self._project
if project is None:
raise Exception("Dict addr_to_run is empty. " + \
"Give... | python | def dbg_print_irsb(self, irsb_addr, project=None):
"""
Pretty-print an IRSB with whitelist information
"""
if project is None:
project = self._project
if project is None:
raise Exception("Dict addr_to_run is empty. " + \
"Give... | [
"def",
"dbg_print_irsb",
"(",
"self",
",",
"irsb_addr",
",",
"project",
"=",
"None",
")",
":",
"if",
"project",
"is",
"None",
":",
"project",
"=",
"self",
".",
"_project",
"if",
"project",
"is",
"None",
":",
"raise",
"Exception",
"(",
"\"Dict addr_to_run i... | Pretty-print an IRSB with whitelist information | [
"Pretty",
"-",
"print",
"an",
"IRSB",
"with",
"whitelist",
"information"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/annocfg.py#L200-L224 | train | Pretty - print an IRSB with whitelist information. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/annocfg.py | AnnotatedCFG.keep_path | def keep_path(self, path):
"""
Given a path, returns True if the path should be kept, False if it should be cut.
"""
if len(path.addr_trace) < 2:
return True
return self.should_take_exit(path.addr_trace[-2], path.addr_trace[-1]) | python | def keep_path(self, path):
"""
Given a path, returns True if the path should be kept, False if it should be cut.
"""
if len(path.addr_trace) < 2:
return True
return self.should_take_exit(path.addr_trace[-2], path.addr_trace[-1]) | [
"def",
"keep_path",
"(",
"self",
",",
"path",
")",
":",
"if",
"len",
"(",
"path",
".",
"addr_trace",
")",
"<",
"2",
":",
"return",
"True",
"return",
"self",
".",
"should_take_exit",
"(",
"path",
".",
"addr_trace",
"[",
"-",
"2",
"]",
",",
"path",
"... | Given a path, returns True if the path should be kept, False if it should be cut. | [
"Given",
"a",
"path",
"returns",
"True",
"if",
"the",
"path",
"should",
"be",
"kept",
"False",
"if",
"it",
"should",
"be",
"cut",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/annocfg.py#L230-L237 | train | Returns True if the path should be kept False otherwise. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/annocfg.py | AnnotatedCFG.successor_func | def successor_func(self, path):
"""
Callback routine that takes in a path, and returns all feasible successors to path group. This callback routine
should be passed to the keyword argument "successor_func" of PathGroup.step().
:param path: A Path instance.
:return: A list of all... | python | def successor_func(self, path):
"""
Callback routine that takes in a path, and returns all feasible successors to path group. This callback routine
should be passed to the keyword argument "successor_func" of PathGroup.step().
:param path: A Path instance.
:return: A list of all... | [
"def",
"successor_func",
"(",
"self",
",",
"path",
")",
":",
"whitelist",
"=",
"self",
".",
"get_whitelisted_statements",
"(",
"path",
".",
"addr",
")",
"last_stmt",
"=",
"self",
".",
"get_last_statement_index",
"(",
"path",
".",
"addr",
")",
"# pass in those ... | Callback routine that takes in a path, and returns all feasible successors to path group. This callback routine
should be passed to the keyword argument "successor_func" of PathGroup.step().
:param path: A Path instance.
:return: A list of all feasible Path successors. | [
"Callback",
"routine",
"that",
"takes",
"in",
"a",
"path",
"and",
"returns",
"all",
"feasible",
"successors",
"to",
"path",
"group",
".",
"This",
"callback",
"routine",
"should",
"be",
"passed",
"to",
"the",
"keyword",
"argument",
"successor_func",
"of",
"Path... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/annocfg.py#L262-L292 | train | This is the callback routine that takes in a path and returns all feasible successors to path group. It returns a list of all feasible successors to path group. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/storage/memory.py | AddressWrapper.to_valueset | def to_valueset(self, state):
"""
Convert to a ValueSet instance
:param state: A state
:return: The converted ValueSet instance
"""
return state.solver.VS(state.arch.bits, self.region, self.region_base_addr, self.address) | python | def to_valueset(self, state):
"""
Convert to a ValueSet instance
:param state: A state
:return: The converted ValueSet instance
"""
return state.solver.VS(state.arch.bits, self.region, self.region_base_addr, self.address) | [
"def",
"to_valueset",
"(",
"self",
",",
"state",
")",
":",
"return",
"state",
".",
"solver",
".",
"VS",
"(",
"state",
".",
"arch",
".",
"bits",
",",
"self",
".",
"region",
",",
"self",
".",
"region_base_addr",
",",
"self",
".",
"address",
")"
] | Convert to a ValueSet instance
:param state: A state
:return: The converted ValueSet instance | [
"Convert",
"to",
"a",
"ValueSet",
"instance"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/storage/memory.py#L47-L54 | train | Convert the current object into a ValueSet. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/storage/memory.py | RegionMap.map | def map(self, absolute_address, region_id, related_function_address=None):
"""
Add a mapping between an absolute address and a region ID. If this is a stack region map, all stack regions
beyond (lower than) this newly added regions will be discarded.
:param absolute_address: ... | python | def map(self, absolute_address, region_id, related_function_address=None):
"""
Add a mapping between an absolute address and a region ID. If this is a stack region map, all stack regions
beyond (lower than) this newly added regions will be discarded.
:param absolute_address: ... | [
"def",
"map",
"(",
"self",
",",
"absolute_address",
",",
"region_id",
",",
"related_function_address",
"=",
"None",
")",
":",
"if",
"self",
".",
"is_stack",
":",
"# Sanity check",
"if",
"not",
"region_id",
".",
"startswith",
"(",
"'stack_'",
")",
":",
"raise... | Add a mapping between an absolute address and a region ID. If this is a stack region map, all stack regions
beyond (lower than) this newly added regions will be discarded.
:param absolute_address: An absolute memory address.
:param region_id: ID of the memory region... | [
"Add",
"a",
"mapping",
"between",
"an",
"absolute",
"address",
"and",
"a",
"region",
"ID",
".",
"If",
"this",
"is",
"a",
"stack",
"region",
"map",
"all",
"stack",
"regions",
"beyond",
"(",
"lower",
"than",
")",
"this",
"newly",
"added",
"regions",
"will"... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/storage/memory.py#L129-L171 | train | Add a mapping between an absolute address and a region ID. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/storage/memory.py | RegionMap.unmap_by_address | def unmap_by_address(self, absolute_address):
"""
Removes a mapping based on its absolute address.
:param absolute_address: An absolute address
"""
desc = self._address_to_region_id[absolute_address]
del self._address_to_region_id[absolute_address]
del self._reg... | python | def unmap_by_address(self, absolute_address):
"""
Removes a mapping based on its absolute address.
:param absolute_address: An absolute address
"""
desc = self._address_to_region_id[absolute_address]
del self._address_to_region_id[absolute_address]
del self._reg... | [
"def",
"unmap_by_address",
"(",
"self",
",",
"absolute_address",
")",
":",
"desc",
"=",
"self",
".",
"_address_to_region_id",
"[",
"absolute_address",
"]",
"del",
"self",
".",
"_address_to_region_id",
"[",
"absolute_address",
"]",
"del",
"self",
".",
"_region_id_t... | Removes a mapping based on its absolute address.
:param absolute_address: An absolute address | [
"Removes",
"a",
"mapping",
"based",
"on",
"its",
"absolute",
"address",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/storage/memory.py#L173-L182 | train | Removes a mapping based on its absolute address. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/storage/memory.py | RegionMap.absolutize | def absolutize(self, region_id, relative_address):
"""
Convert a relative address in some memory region to an absolute address.
:param region_id: The memory region ID
:param relative_address: The relative memory offset in that memory region
:return: ... | python | def absolutize(self, region_id, relative_address):
"""
Convert a relative address in some memory region to an absolute address.
:param region_id: The memory region ID
:param relative_address: The relative memory offset in that memory region
:return: ... | [
"def",
"absolutize",
"(",
"self",
",",
"region_id",
",",
"relative_address",
")",
":",
"if",
"region_id",
"==",
"'global'",
":",
"# The global region always bases 0",
"return",
"relative_address",
"if",
"region_id",
"not",
"in",
"self",
".",
"_region_id_to_address",
... | Convert a relative address in some memory region to an absolute address.
:param region_id: The memory region ID
:param relative_address: The relative memory offset in that memory region
:return: An absolute address if converted, or an exception is raised when reg... | [
"Convert",
"a",
"relative",
"address",
"in",
"some",
"memory",
"region",
"to",
"an",
"absolute",
"address",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/storage/memory.py#L184-L202 | train | Converts a relative address in some memory region to an absolute address. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/storage/memory.py | RegionMap.relativize | def relativize(self, absolute_address, target_region_id=None):
"""
Convert an absolute address to the memory offset in a memory region.
Note that if an address belongs to heap region is passed in to a stack region map, it will be converted to an
offset included in the closest stack fram... | python | def relativize(self, absolute_address, target_region_id=None):
"""
Convert an absolute address to the memory offset in a memory region.
Note that if an address belongs to heap region is passed in to a stack region map, it will be converted to an
offset included in the closest stack fram... | [
"def",
"relativize",
"(",
"self",
",",
"absolute_address",
",",
"target_region_id",
"=",
"None",
")",
":",
"if",
"target_region_id",
"is",
"None",
":",
"if",
"self",
".",
"is_stack",
":",
"# Get the base address of the stack frame it belongs to",
"base_address",
"=",
... | Convert an absolute address to the memory offset in a memory region.
Note that if an address belongs to heap region is passed in to a stack region map, it will be converted to an
offset included in the closest stack frame, and vice versa for passing a stack address to a heap region.
Therefore y... | [
"Convert",
"an",
"absolute",
"address",
"to",
"the",
"memory",
"offset",
"in",
"a",
"memory",
"region",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/storage/memory.py#L204-L244 | train | This function will return the closest region ID relative offset and related function address. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/storage/memory.py | SimMemory.category | def category(self):
"""
Return the category of this SimMemory instance. It can be one of the three following categories: reg, mem,
or file.
"""
if self.id in ('reg', 'mem'):
return self.id
elif self._abstract_backer:
return 'mem'
elif se... | python | def category(self):
"""
Return the category of this SimMemory instance. It can be one of the three following categories: reg, mem,
or file.
"""
if self.id in ('reg', 'mem'):
return self.id
elif self._abstract_backer:
return 'mem'
elif se... | [
"def",
"category",
"(",
"self",
")",
":",
"if",
"self",
".",
"id",
"in",
"(",
"'reg'",
",",
"'mem'",
")",
":",
"return",
"self",
".",
"id",
"elif",
"self",
".",
"_abstract_backer",
":",
"return",
"'mem'",
"elif",
"self",
".",
"id",
".",
"startswith",... | Return the category of this SimMemory instance. It can be one of the three following categories: reg, mem,
or file. | [
"Return",
"the",
"category",
"of",
"this",
"SimMemory",
"instance",
".",
"It",
"can",
"be",
"one",
"of",
"the",
"three",
"following",
"categories",
":",
"reg",
"mem",
"or",
"file",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/storage/memory.py#L316-L332 | train | Return the category of this memory instance. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/storage/memory.py | SimMemory.set_state | def set_state(self, state):
"""
Call the set_state method in SimStatePlugin class, and then perform the delayed initialization.
:param state: The SimState instance
"""
SimStatePlugin.set_state(self, state)
# Delayed initialization
stack_region_map, generic_regio... | python | def set_state(self, state):
"""
Call the set_state method in SimStatePlugin class, and then perform the delayed initialization.
:param state: The SimState instance
"""
SimStatePlugin.set_state(self, state)
# Delayed initialization
stack_region_map, generic_regio... | [
"def",
"set_state",
"(",
"self",
",",
"state",
")",
":",
"SimStatePlugin",
".",
"set_state",
"(",
"self",
",",
"state",
")",
"# Delayed initialization",
"stack_region_map",
",",
"generic_region_map",
"=",
"self",
".",
"_temp_stack_region_map",
",",
"self",
".",
... | Call the set_state method in SimStatePlugin class, and then perform the delayed initialization.
:param state: The SimState instance | [
"Call",
"the",
"set_state",
"method",
"in",
"SimStatePlugin",
"class",
"and",
"then",
"perform",
"the",
"delayed",
"initialization",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/storage/memory.py#L341-L365 | train | Set the state of the current instance of the class. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/storage/memory.py | SimMemory._convert_to_ast | def _convert_to_ast(self, data_e, size_e=None):
"""
Make an AST out of concrete @data_e
"""
if type(data_e) is bytes:
# Convert the string into a BVV, *regardless of endness*
bits = len(data_e) * self.state.arch.byte_width
data_e = self.state.solver.BV... | python | def _convert_to_ast(self, data_e, size_e=None):
"""
Make an AST out of concrete @data_e
"""
if type(data_e) is bytes:
# Convert the string into a BVV, *regardless of endness*
bits = len(data_e) * self.state.arch.byte_width
data_e = self.state.solver.BV... | [
"def",
"_convert_to_ast",
"(",
"self",
",",
"data_e",
",",
"size_e",
"=",
"None",
")",
":",
"if",
"type",
"(",
"data_e",
")",
"is",
"bytes",
":",
"# Convert the string into a BVV, *regardless of endness*",
"bits",
"=",
"len",
"(",
"data_e",
")",
"*",
"self",
... | Make an AST out of concrete @data_e | [
"Make",
"an",
"AST",
"out",
"of",
"concrete"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/storage/memory.py#L397-L411 | train | Convert a string into an AST. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/storage/memory.py | SimMemory.set_stack_address_mapping | def set_stack_address_mapping(self, absolute_address, region_id, related_function_address=None):
"""
Create a new mapping between an absolute address (which is the base address of a specific stack frame) and a
region ID.
:param absolute_address: The absolute memory address.
:par... | python | def set_stack_address_mapping(self, absolute_address, region_id, related_function_address=None):
"""
Create a new mapping between an absolute address (which is the base address of a specific stack frame) and a
region ID.
:param absolute_address: The absolute memory address.
:par... | [
"def",
"set_stack_address_mapping",
"(",
"self",
",",
"absolute_address",
",",
"region_id",
",",
"related_function_address",
"=",
"None",
")",
":",
"if",
"self",
".",
"_stack_region_map",
"is",
"None",
":",
"raise",
"SimMemoryError",
"(",
"'Stack region map is not ini... | Create a new mapping between an absolute address (which is the base address of a specific stack frame) and a
region ID.
:param absolute_address: The absolute memory address.
:param region_id: The region ID.
:param related_function_address: Related function address. | [
"Create",
"a",
"new",
"mapping",
"between",
"an",
"absolute",
"address",
"(",
"which",
"is",
"the",
"base",
"address",
"of",
"a",
"specific",
"stack",
"frame",
")",
"and",
"a",
"region",
"ID",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/storage/memory.py#L413-L424 | train | Create a new mapping between an absolute address and a specific region ID. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/storage/memory.py | SimMemory.unset_stack_address_mapping | def unset_stack_address_mapping(self, absolute_address):
"""
Remove a stack mapping.
:param absolute_address: An absolute memory address, which is the base address of the stack frame to destroy.
"""
if self._stack_region_map is None:
raise SimMemoryError('Stack regio... | python | def unset_stack_address_mapping(self, absolute_address):
"""
Remove a stack mapping.
:param absolute_address: An absolute memory address, which is the base address of the stack frame to destroy.
"""
if self._stack_region_map is None:
raise SimMemoryError('Stack regio... | [
"def",
"unset_stack_address_mapping",
"(",
"self",
",",
"absolute_address",
")",
":",
"if",
"self",
".",
"_stack_region_map",
"is",
"None",
":",
"raise",
"SimMemoryError",
"(",
"'Stack region map is not initialized.'",
")",
"self",
".",
"_stack_region_map",
".",
"unma... | Remove a stack mapping.
:param absolute_address: An absolute memory address, which is the base address of the stack frame to destroy. | [
"Remove",
"a",
"stack",
"mapping",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/storage/memory.py#L426-L434 | train | Removes a stack mapping. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/storage/memory.py | SimMemory.stack_id | def stack_id(self, function_address):
"""
Return a memory region ID for a function. If the default region ID exists in the region mapping, an integer
will appended to the region name. In this way we can handle recursive function calls, or a function that
appears more than once in the cal... | python | def stack_id(self, function_address):
"""
Return a memory region ID for a function. If the default region ID exists in the region mapping, an integer
will appended to the region name. In this way we can handle recursive function calls, or a function that
appears more than once in the cal... | [
"def",
"stack_id",
"(",
"self",
",",
"function_address",
")",
":",
"region_id",
"=",
"'stack_0x%x'",
"%",
"function_address",
"# deduplication",
"region_ids",
"=",
"self",
".",
"_stack_region_map",
".",
"region_ids",
"if",
"region_id",
"not",
"in",
"region_ids",
"... | Return a memory region ID for a function. If the default region ID exists in the region mapping, an integer
will appended to the region name. In this way we can handle recursive function calls, or a function that
appears more than once in the call frame.
This also means that `stack_id()` should... | [
"Return",
"a",
"memory",
"region",
"ID",
"for",
"a",
"function",
".",
"If",
"the",
"default",
"region",
"ID",
"exists",
"in",
"the",
"region",
"mapping",
"an",
"integer",
"will",
"appended",
"to",
"the",
"region",
"name",
".",
"In",
"this",
"way",
"we",
... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/storage/memory.py#L436-L460 | train | Return a memory region ID for a function. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/storage/memory.py | SimMemory.store | def store(self, addr, data, size=None, condition=None, add_constraints=None, endness=None, action=None,
inspect=True, priv=None, disable_actions=False):
"""
Stores content into memory.
:param addr: A claripy expression representing the address to store at.
:param da... | python | def store(self, addr, data, size=None, condition=None, add_constraints=None, endness=None, action=None,
inspect=True, priv=None, disable_actions=False):
"""
Stores content into memory.
:param addr: A claripy expression representing the address to store at.
:param da... | [
"def",
"store",
"(",
"self",
",",
"addr",
",",
"data",
",",
"size",
"=",
"None",
",",
"condition",
"=",
"None",
",",
"add_constraints",
"=",
"None",
",",
"endness",
"=",
"None",
",",
"action",
"=",
"None",
",",
"inspect",
"=",
"True",
",",
"priv",
... | Stores content into memory.
:param addr: A claripy expression representing the address to store at.
:param data: The data to store (claripy expression or something convertable to a claripy expression).
:param size: A claripy expression representing the size of the data to s... | [
"Stores",
"content",
"into",
"memory",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/storage/memory.py#L462-L599 | train | Stores the content of the specified data at the specified address. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/storage/memory.py | SimMemory.store_cases | def store_cases(self, addr, contents, conditions, fallback=None, add_constraints=None, endness=None, action=None):
"""
Stores content into memory, conditional by case.
:param addr: A claripy expression representing the address to store at.
:param contents: A list of bi... | python | def store_cases(self, addr, contents, conditions, fallback=None, add_constraints=None, endness=None, action=None):
"""
Stores content into memory, conditional by case.
:param addr: A claripy expression representing the address to store at.
:param contents: A list of bi... | [
"def",
"store_cases",
"(",
"self",
",",
"addr",
",",
"contents",
",",
"conditions",
",",
"fallback",
"=",
"None",
",",
"add_constraints",
"=",
"None",
",",
"endness",
"=",
"None",
",",
"action",
"=",
"None",
")",
":",
"if",
"fallback",
"is",
"None",
"a... | Stores content into memory, conditional by case.
:param addr: A claripy expression representing the address to store at.
:param contents: A list of bitvectors, not necessarily of the same size. Use None to denote an empty
write.
:param condition... | [
"Stores",
"content",
"into",
"memory",
"conditional",
"by",
"case",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/storage/memory.py#L604-L660 | train | Stores the contents of a bitvector into memory. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/storage/memory.py | SimMemory.load | def load(self, addr, size=None, condition=None, fallback=None, add_constraints=None, action=None, endness=None,
inspect=True, disable_actions=False, ret_on_segv=False):
"""
Loads size bytes from dst.
:param dst: The address to load from.
:param size: ... | python | def load(self, addr, size=None, condition=None, fallback=None, add_constraints=None, action=None, endness=None,
inspect=True, disable_actions=False, ret_on_segv=False):
"""
Loads size bytes from dst.
:param dst: The address to load from.
:param size: ... | [
"def",
"load",
"(",
"self",
",",
"addr",
",",
"size",
"=",
"None",
",",
"condition",
"=",
"None",
",",
"fallback",
"=",
"None",
",",
"add_constraints",
"=",
"None",
",",
"action",
"=",
"None",
",",
"endness",
"=",
"None",
",",
"inspect",
"=",
"True",... | Loads size bytes from dst.
:param dst: The address to load from.
:param size: The size (in bytes) of the load.
:param condition: A claripy expression representing a condition for a conditional load.
:param fallback: A fallback value if the condition e... | [
"Loads",
"size",
"bytes",
"from",
"dst",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/storage/memory.py#L701-L836 | train | Load a memory area from the specified address. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/storage/memory.py | SimMemory.find | def find(self, addr, what, max_search=None, max_symbolic_bytes=None, default=None, step=1,
disable_actions=False, inspect=True, chunk_size=None):
"""
Returns the address of bytes equal to 'what', starting from 'start'. Note that, if you don't specify a default
value, this search co... | python | def find(self, addr, what, max_search=None, max_symbolic_bytes=None, default=None, step=1,
disable_actions=False, inspect=True, chunk_size=None):
"""
Returns the address of bytes equal to 'what', starting from 'start'. Note that, if you don't specify a default
value, this search co... | [
"def",
"find",
"(",
"self",
",",
"addr",
",",
"what",
",",
"max_search",
"=",
"None",
",",
"max_symbolic_bytes",
"=",
"None",
",",
"default",
"=",
"None",
",",
"step",
"=",
"1",
",",
"disable_actions",
"=",
"False",
",",
"inspect",
"=",
"True",
",",
... | Returns the address of bytes equal to 'what', starting from 'start'. Note that, if you don't specify a default
value, this search could cause the state to go unsat if no possible matching byte exists.
:param addr: The start address.
:param what: What to search for;... | [
"Returns",
"the",
"address",
"of",
"bytes",
"equal",
"to",
"what",
"starting",
"from",
"start",
".",
"Note",
"that",
"if",
"you",
"don",
"t",
"specify",
"a",
"default",
"value",
"this",
"search",
"could",
"cause",
"the",
"state",
"to",
"go",
"unsat",
"if... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/storage/memory.py#L858-L888 | train | Searches for a given byte in memory and returns the address of the matching byte. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/storage/memory.py | SimMemory.copy_contents | def copy_contents(self, dst, src, size, condition=None, src_memory=None, dst_memory=None, inspect=True,
disable_actions=False):
"""
Copies data within a memory.
:param dst: A claripy expression representing the address of the destination
:param src: ... | python | def copy_contents(self, dst, src, size, condition=None, src_memory=None, dst_memory=None, inspect=True,
disable_actions=False):
"""
Copies data within a memory.
:param dst: A claripy expression representing the address of the destination
:param src: ... | [
"def",
"copy_contents",
"(",
"self",
",",
"dst",
",",
"src",
",",
"size",
",",
"condition",
"=",
"None",
",",
"src_memory",
"=",
"None",
",",
"dst_memory",
"=",
"None",
",",
"inspect",
"=",
"True",
",",
"disable_actions",
"=",
"False",
")",
":",
"dst",... | Copies data within a memory.
:param dst: A claripy expression representing the address of the destination
:param src: A claripy expression representing the address of the source
The following parameters are optional.
:param src_memory: Copy data from this SimMemory in... | [
"Copies",
"data",
"within",
"a",
"memory",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/storage/memory.py#L894-L916 | train | Copies the contents of src into dst within a memory. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/datagraph_meta.py | DataGraphMeta._vfg_node | def _vfg_node(self, addr):
"""
Gets vfg node at @addr
Returns VFGNode or None
"""
for n in self._vfg._nodes.values():
if n.addr == addr:
return n
raise DataGraphError("No VFG node at 0x%x" % addr) | python | def _vfg_node(self, addr):
"""
Gets vfg node at @addr
Returns VFGNode or None
"""
for n in self._vfg._nodes.values():
if n.addr == addr:
return n
raise DataGraphError("No VFG node at 0x%x" % addr) | [
"def",
"_vfg_node",
"(",
"self",
",",
"addr",
")",
":",
"for",
"n",
"in",
"self",
".",
"_vfg",
".",
"_nodes",
".",
"values",
"(",
")",
":",
"if",
"n",
".",
"addr",
"==",
"addr",
":",
"return",
"n",
"raise",
"DataGraphError",
"(",
"\"No VFG node at 0x... | Gets vfg node at @addr
Returns VFGNode or None | [
"Gets",
"vfg",
"node",
"at"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/datagraph_meta.py#L17-L25 | train | Returns the VFGNode at the given address or None if no such node exists. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/datagraph_meta.py | DataGraphMeta.pp | def pp(self, imarks=False):
"""
Pretty print the graph. @imarks determine whether the printed graph
represents instructions (coarse grained) for easier navigation, or
exact statements.
"""
for e in self.graph.edges():
data = dict(self.graph.get_edge_data(e[0... | python | def pp(self, imarks=False):
"""
Pretty print the graph. @imarks determine whether the printed graph
represents instructions (coarse grained) for easier navigation, or
exact statements.
"""
for e in self.graph.edges():
data = dict(self.graph.get_edge_data(e[0... | [
"def",
"pp",
"(",
"self",
",",
"imarks",
"=",
"False",
")",
":",
"for",
"e",
"in",
"self",
".",
"graph",
".",
"edges",
"(",
")",
":",
"data",
"=",
"dict",
"(",
"self",
".",
"graph",
".",
"get_edge_data",
"(",
"e",
"[",
"0",
"]",
",",
"e",
"["... | Pretty print the graph. @imarks determine whether the printed graph
represents instructions (coarse grained) for easier navigation, or
exact statements. | [
"Pretty",
"print",
"the",
"graph",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/datagraph_meta.py#L33-L42 | train | Pretty print the graph. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/datagraph_meta.py | DataGraphMeta._branch | def _branch(self, live_defs, node, path=""):
"""
Recursive function, it branches in every possible path in the VFG.
@live_defs: a dict {addr:stmt} of live definitions at the start point
@node: the starting vfg node
Returns: the address of the block where the execution stops
... | python | def _branch(self, live_defs, node, path=""):
"""
Recursive function, it branches in every possible path in the VFG.
@live_defs: a dict {addr:stmt} of live definitions at the start point
@node: the starting vfg node
Returns: the address of the block where the execution stops
... | [
"def",
"_branch",
"(",
"self",
",",
"live_defs",
",",
"node",
",",
"path",
"=",
"\"\"",
")",
":",
"irsb",
"=",
"self",
".",
"_irsb",
"(",
"node",
".",
"state",
")",
"path",
"=",
"path",
"+",
"\" -> \"",
"+",
"hex",
"(",
"irsb",
".",
"addr",
")",
... | Recursive function, it branches in every possible path in the VFG.
@live_defs: a dict {addr:stmt} of live definitions at the start point
@node: the starting vfg node
Returns: the address of the block where the execution stops | [
"Recursive",
"function",
"it",
"branches",
"in",
"every",
"possible",
"path",
"in",
"the",
"VFG",
".",
"@live_defs",
":",
"a",
"dict",
"{",
"addr",
":",
"stmt",
"}",
"of",
"live",
"definitions",
"at",
"the",
"start",
"point",
"@node",
":",
"the",
"starti... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/datagraph_meta.py#L55-L92 | train | Recursive function that branches in every possible path in the VFG. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/abstract_memory.py | MemoryRegion.get_abstract_locations | def get_abstract_locations(self, addr, size):
"""
Get a list of abstract locations that is within the range of [addr, addr + size]
This implementation is pretty slow. But since this method won't be called frequently, we can live with the bad
implementation for now.
:param addr:... | python | def get_abstract_locations(self, addr, size):
"""
Get a list of abstract locations that is within the range of [addr, addr + size]
This implementation is pretty slow. But since this method won't be called frequently, we can live with the bad
implementation for now.
:param addr:... | [
"def",
"get_abstract_locations",
"(",
"self",
",",
"addr",
",",
"size",
")",
":",
"ret",
"=",
"[",
"]",
"for",
"aloc",
"in",
"self",
".",
"_alocs",
".",
"values",
"(",
")",
":",
"for",
"seg",
"in",
"aloc",
".",
"segments",
":",
"if",
"seg",
".",
... | Get a list of abstract locations that is within the range of [addr, addr + size]
This implementation is pretty slow. But since this method won't be called frequently, we can live with the bad
implementation for now.
:param addr: Starting address of the memory region.
:param size: ... | [
"Get",
"a",
"list",
"of",
"abstract",
"locations",
"that",
"is",
"within",
"the",
"range",
"of",
"[",
"addr",
"addr",
"+",
"size",
"]"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/abstract_memory.py#L68-L87 | train | Get a list of abstract locations that are within the range of addr and addr + size. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/abstract_memory.py | MemoryRegion._merge_alocs | def _merge_alocs(self, other_region):
"""
Helper function for merging.
"""
merging_occurred = False
for aloc_id, aloc in other_region.alocs.items():
if aloc_id not in self.alocs:
self.alocs[aloc_id] = aloc.copy()
merging_occurred = True... | python | def _merge_alocs(self, other_region):
"""
Helper function for merging.
"""
merging_occurred = False
for aloc_id, aloc in other_region.alocs.items():
if aloc_id not in self.alocs:
self.alocs[aloc_id] = aloc.copy()
merging_occurred = True... | [
"def",
"_merge_alocs",
"(",
"self",
",",
"other_region",
")",
":",
"merging_occurred",
"=",
"False",
"for",
"aloc_id",
",",
"aloc",
"in",
"other_region",
".",
"alocs",
".",
"items",
"(",
")",
":",
"if",
"aloc_id",
"not",
"in",
"self",
".",
"alocs",
":",
... | Helper function for merging. | [
"Helper",
"function",
"for",
"merging",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/abstract_memory.py#L132-L144 | train | Helper function for merging. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/abstract_memory.py | MemoryRegion.dbg_print | def dbg_print(self, indent=0):
"""
Print out debugging information
"""
print("%sA-locs:" % (" " * indent))
for aloc_id, aloc in self._alocs.items():
print("%s<0x%x> %s" % (" " * (indent + 2), aloc_id, aloc))
print("%sMemory:" % (" " * indent))
self.me... | python | def dbg_print(self, indent=0):
"""
Print out debugging information
"""
print("%sA-locs:" % (" " * indent))
for aloc_id, aloc in self._alocs.items():
print("%s<0x%x> %s" % (" " * (indent + 2), aloc_id, aloc))
print("%sMemory:" % (" " * indent))
self.me... | [
"def",
"dbg_print",
"(",
"self",
",",
"indent",
"=",
"0",
")",
":",
"print",
"(",
"\"%sA-locs:\"",
"%",
"(",
"\" \"",
"*",
"indent",
")",
")",
"for",
"aloc_id",
",",
"aloc",
"in",
"self",
".",
"_alocs",
".",
"items",
"(",
")",
":",
"print",
"(",
... | Print out debugging information | [
"Print",
"out",
"debugging",
"information"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/abstract_memory.py#L168-L177 | train | Print out debugging information for this object. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/abstract_memory.py | SimAbstractMemory._region_base | def _region_base(self, region):
"""
Get the base address of a memory region.
:param str region: ID of the memory region
:return: Address of the memory region
:rtype: int
"""
if region == 'global':
region_base_addr = 0
elif region.startswith('... | python | def _region_base(self, region):
"""
Get the base address of a memory region.
:param str region: ID of the memory region
:return: Address of the memory region
:rtype: int
"""
if region == 'global':
region_base_addr = 0
elif region.startswith('... | [
"def",
"_region_base",
"(",
"self",
",",
"region",
")",
":",
"if",
"region",
"==",
"'global'",
":",
"region_base_addr",
"=",
"0",
"elif",
"region",
".",
"startswith",
"(",
"'stack_'",
")",
":",
"region_base_addr",
"=",
"self",
".",
"_stack_region_map",
".",
... | Get the base address of a memory region.
:param str region: ID of the memory region
:return: Address of the memory region
:rtype: int | [
"Get",
"the",
"base",
"address",
"of",
"a",
"memory",
"region",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/abstract_memory.py#L215-L231 | train | Get the base address of a memory region. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/abstract_memory.py | SimAbstractMemory.create_region | def create_region(self, key, state, is_stack, related_function_addr, endness, backer_dict=None):
"""
Create a new MemoryRegion with the region key specified, and store it to self._regions.
:param key: a string which is the region key
:param state: the SimState instance
:param bo... | python | def create_region(self, key, state, is_stack, related_function_addr, endness, backer_dict=None):
"""
Create a new MemoryRegion with the region key specified, and store it to self._regions.
:param key: a string which is the region key
:param state: the SimState instance
:param bo... | [
"def",
"create_region",
"(",
"self",
",",
"key",
",",
"state",
",",
"is_stack",
",",
"related_function_addr",
",",
"endness",
",",
"backer_dict",
"=",
"None",
")",
":",
"self",
".",
"_regions",
"[",
"key",
"]",
"=",
"MemoryRegion",
"(",
"key",
",",
"stat... | Create a new MemoryRegion with the region key specified, and store it to self._regions.
:param key: a string which is the region key
:param state: the SimState instance
:param bool is_stack: Whether this memory region is on stack. True/False
:param related_function_addr: Which function ... | [
"Create",
"a",
"new",
"MemoryRegion",
"with",
"the",
"region",
"key",
"specified",
"and",
"store",
"it",
"to",
"self",
".",
"_regions",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/abstract_memory.py#L236-L255 | train | Create a new MemoryRegion with the specified key and store it in self. _regions. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/abstract_memory.py | SimAbstractMemory._normalize_address | def _normalize_address(self, region_id, relative_address, target_region=None):
"""
If this is a stack address, we convert it to a correct region and address
:param region_id: a string indicating which region the address is relative to
:param relative_address: an address that is relative... | python | def _normalize_address(self, region_id, relative_address, target_region=None):
"""
If this is a stack address, we convert it to a correct region and address
:param region_id: a string indicating which region the address is relative to
:param relative_address: an address that is relative... | [
"def",
"_normalize_address",
"(",
"self",
",",
"region_id",
",",
"relative_address",
",",
"target_region",
"=",
"None",
")",
":",
"if",
"self",
".",
"_stack_region_map",
".",
"is_empty",
"and",
"self",
".",
"_generic_region_map",
".",
"is_empty",
":",
"# We don'... | If this is a stack address, we convert it to a correct region and address
:param region_id: a string indicating which region the address is relative to
:param relative_address: an address that is relative to the region parameter
:param target_region: the ideal target region that address is norm... | [
"If",
"this",
"is",
"a",
"stack",
"address",
"we",
"convert",
"it",
"to",
"a",
"correct",
"region",
"and",
"address"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/abstract_memory.py#L257-L298 | train | This function is used to normalize an address to a correct region and return an AddressWrapper object. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/abstract_memory.py | SimAbstractMemory.set_state | def set_state(self, state):
"""
Overriding the SimStatePlugin.set_state() method
:param state: A SimState object
:return: None
"""
# Sanity check
if REGION_MAPPING not in state.options:
# add REGION_MAPPING into state.options
l.warning('O... | python | def set_state(self, state):
"""
Overriding the SimStatePlugin.set_state() method
:param state: A SimState object
:return: None
"""
# Sanity check
if REGION_MAPPING not in state.options:
# add REGION_MAPPING into state.options
l.warning('O... | [
"def",
"set_state",
"(",
"self",
",",
"state",
")",
":",
"# Sanity check",
"if",
"REGION_MAPPING",
"not",
"in",
"state",
".",
"options",
":",
"# add REGION_MAPPING into state.options",
"l",
".",
"warning",
"(",
"'Option \"REGION_MAPPING\" must be enabled when using SimAbs... | Overriding the SimStatePlugin.set_state() method
:param state: A SimState object
:return: None | [
"Overriding",
"the",
"SimStatePlugin",
".",
"set_state",
"()",
"method"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/abstract_memory.py#L300-L329 | train | Overriding the SimStatePlugin. set_state method. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/abstract_memory.py | SimAbstractMemory.normalize_address | def normalize_address(self, addr, is_write=False, convert_to_valueset=False, target_region=None, condition=None): #pylint:disable=arguments-differ
"""
Convert a ValueSet object into a list of addresses.
:param addr: A ValueSet object (which describes an address)
:param is_write: Is this... | python | def normalize_address(self, addr, is_write=False, convert_to_valueset=False, target_region=None, condition=None): #pylint:disable=arguments-differ
"""
Convert a ValueSet object into a list of addresses.
:param addr: A ValueSet object (which describes an address)
:param is_write: Is this... | [
"def",
"normalize_address",
"(",
"self",
",",
"addr",
",",
"is_write",
"=",
"False",
",",
"convert_to_valueset",
"=",
"False",
",",
"target_region",
"=",
"None",
",",
"condition",
"=",
"None",
")",
":",
"#pylint:disable=arguments-differ",
"targets_limit",
"=",
"... | Convert a ValueSet object into a list of addresses.
:param addr: A ValueSet object (which describes an address)
:param is_write: Is this address used in a write or not
:param convert_to_valueset: True if you want to have a list of ValueSet instances instead of AddressWrappers,
... | [
"Convert",
"a",
"ValueSet",
"object",
"into",
"a",
"list",
"of",
"addresses",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/abstract_memory.py#L331-L380 | train | Normalizes an address into a list of addresses. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/abstract_memory.py | SimAbstractMemory._normalize_address_type | def _normalize_address_type(self, addr): #pylint:disable=no-self-use
"""
Convert address of different types to a list of mapping between region IDs and offsets (strided intervals).
:param claripy.ast.Base addr: Address to convert
:return: A list of mapping between region IDs and offsets... | python | def _normalize_address_type(self, addr): #pylint:disable=no-self-use
"""
Convert address of different types to a list of mapping between region IDs and offsets (strided intervals).
:param claripy.ast.Base addr: Address to convert
:return: A list of mapping between region IDs and offsets... | [
"def",
"_normalize_address_type",
"(",
"self",
",",
"addr",
")",
":",
"#pylint:disable=no-self-use",
"addr_e",
"=",
"_raw_ast",
"(",
"addr",
")",
"if",
"isinstance",
"(",
"addr_e",
",",
"(",
"claripy",
".",
"bv",
".",
"BVV",
",",
"claripy",
".",
"vsa",
"."... | Convert address of different types to a list of mapping between region IDs and offsets (strided intervals).
:param claripy.ast.Base addr: Address to convert
:return: A list of mapping between region IDs and offsets.
:rtype: dict | [
"Convert",
"address",
"of",
"different",
"types",
"to",
"a",
"list",
"of",
"mapping",
"between",
"region",
"IDs",
"and",
"offsets",
"(",
"strided",
"intervals",
")",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/abstract_memory.py#L382-L404 | train | Convert an address of different types to a list of mapping between region IDs and offsets. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/abstract_memory.py | SimAbstractMemory.get_segments | def get_segments(self, addr, size):
"""
Get a segmented memory region based on AbstractLocation information available from VSA.
Here are some assumptions to make this method fast:
- The entire memory region [addr, addr + size] is located within the same MemoryRegion
- Th... | python | def get_segments(self, addr, size):
"""
Get a segmented memory region based on AbstractLocation information available from VSA.
Here are some assumptions to make this method fast:
- The entire memory region [addr, addr + size] is located within the same MemoryRegion
- Th... | [
"def",
"get_segments",
"(",
"self",
",",
"addr",
",",
"size",
")",
":",
"address_wrappers",
"=",
"self",
".",
"normalize_address",
"(",
"addr",
",",
"is_write",
"=",
"False",
")",
"# assert len(address_wrappers) > 0",
"aw",
"=",
"address_wrappers",
"[",
"0",
"... | Get a segmented memory region based on AbstractLocation information available from VSA.
Here are some assumptions to make this method fast:
- The entire memory region [addr, addr + size] is located within the same MemoryRegion
- The address 'addr' has only one concrete value. It cannot ... | [
"Get",
"a",
"segmented",
"memory",
"region",
"based",
"on",
"AbstractLocation",
"information",
"available",
"from",
"VSA",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/abstract_memory.py#L541-L605 | train | Get a list of segments that are available in memory for the given address and size. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/abstract_memory.py | SimAbstractMemory.copy | def copy(self, memo):
"""
Make a copy of this SimAbstractMemory object
:return:
"""
am = SimAbstractMemory(
memory_id=self._memory_id,
endness=self.endness,
stack_region_map=self._stack_region_map,
generic_region_map=self._generic_r... | python | def copy(self, memo):
"""
Make a copy of this SimAbstractMemory object
:return:
"""
am = SimAbstractMemory(
memory_id=self._memory_id,
endness=self.endness,
stack_region_map=self._stack_region_map,
generic_region_map=self._generic_r... | [
"def",
"copy",
"(",
"self",
",",
"memo",
")",
":",
"am",
"=",
"SimAbstractMemory",
"(",
"memory_id",
"=",
"self",
".",
"_memory_id",
",",
"endness",
"=",
"self",
".",
"endness",
",",
"stack_region_map",
"=",
"self",
".",
"_stack_region_map",
",",
"generic_... | Make a copy of this SimAbstractMemory object
:return: | [
"Make",
"a",
"copy",
"of",
"this",
"SimAbstractMemory",
"object",
":",
"return",
":"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/abstract_memory.py#L608-L622 | train | Make a copy of this SimAbstractMemory object. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/abstract_memory.py | SimAbstractMemory.merge | def merge(self, others, merge_conditions, common_ancestor=None):
"""
Merge this guy with another SimAbstractMemory instance
"""
merging_occurred = False
for o in others:
for region_id, region in o._regions.items():
if region_id in self._regions:
... | python | def merge(self, others, merge_conditions, common_ancestor=None):
"""
Merge this guy with another SimAbstractMemory instance
"""
merging_occurred = False
for o in others:
for region_id, region in o._regions.items():
if region_id in self._regions:
... | [
"def",
"merge",
"(",
"self",
",",
"others",
",",
"merge_conditions",
",",
"common_ancestor",
"=",
"None",
")",
":",
"merging_occurred",
"=",
"False",
"for",
"o",
"in",
"others",
":",
"for",
"region_id",
",",
"region",
"in",
"o",
".",
"_regions",
".",
"it... | Merge this guy with another SimAbstractMemory instance | [
"Merge",
"this",
"guy",
"with",
"another",
"SimAbstractMemory",
"instance"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/abstract_memory.py#L624-L640 | train | Merge this guy with another guy. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/abstract_memory.py | SimAbstractMemory.dbg_print | def dbg_print(self):
"""
Print out debugging information
"""
for region_id, region in self.regions.items():
print("Region [%s]:" % region_id)
region.dbg_print(indent=2) | python | def dbg_print(self):
"""
Print out debugging information
"""
for region_id, region in self.regions.items():
print("Region [%s]:" % region_id)
region.dbg_print(indent=2) | [
"def",
"dbg_print",
"(",
"self",
")",
":",
"for",
"region_id",
",",
"region",
"in",
"self",
".",
"regions",
".",
"items",
"(",
")",
":",
"print",
"(",
"\"Region [%s]:\"",
"%",
"region_id",
")",
"region",
".",
"dbg_print",
"(",
"indent",
"=",
"2",
")"
] | Print out debugging information | [
"Print",
"out",
"debugging",
"information"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/abstract_memory.py#L699-L705 | train | Print out debugging information about the current set of resources. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/procedures/glibc/__libc_start_main.py | __libc_start_main._initialize_toupper_loc_table | def _initialize_toupper_loc_table(self):
"""
Initialize ptable for ctype
See __ctype_toupper_loc.c in libc implementation
"""
malloc = angr.SIM_PROCEDURES['libc']['malloc']
# 384 entries, 4 bytes each
table = self.inline_call(malloc, 384*4).ret_expr
table... | python | def _initialize_toupper_loc_table(self):
"""
Initialize ptable for ctype
See __ctype_toupper_loc.c in libc implementation
"""
malloc = angr.SIM_PROCEDURES['libc']['malloc']
# 384 entries, 4 bytes each
table = self.inline_call(malloc, 384*4).ret_expr
table... | [
"def",
"_initialize_toupper_loc_table",
"(",
"self",
")",
":",
"malloc",
"=",
"angr",
".",
"SIM_PROCEDURES",
"[",
"'libc'",
"]",
"[",
"'malloc'",
"]",
"# 384 entries, 4 bytes each",
"table",
"=",
"self",
".",
"inline_call",
"(",
"malloc",
",",
"384",
"*",
"4",... | Initialize ptable for ctype
See __ctype_toupper_loc.c in libc implementation | [
"Initialize",
"ptable",
"for",
"ctype"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/procedures/glibc/__libc_start_main.py#L80-L109 | train | Initialize the ptable for ctype_toupper_loc. c in libc implementation. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/procedures/glibc/__libc_start_main.py | __libc_start_main._extract_args | def _extract_args(state, main, argc, argv, init, fini):
"""
Extract arguments and set them to
:param angr.sim_state.SimState state: The program state.
:param main: An argument to __libc_start_main.
:param argc: An argument to __libc_start_main.
:param argv: An argument t... | python | def _extract_args(state, main, argc, argv, init, fini):
"""
Extract arguments and set them to
:param angr.sim_state.SimState state: The program state.
:param main: An argument to __libc_start_main.
:param argc: An argument to __libc_start_main.
:param argv: An argument t... | [
"def",
"_extract_args",
"(",
"state",
",",
"main",
",",
"argc",
",",
"argv",
",",
"init",
",",
"fini",
")",
":",
"main_",
"=",
"main",
"argc_",
"=",
"argc",
"argv_",
"=",
"argv",
"init_",
"=",
"init",
"fini_",
"=",
"fini",
"if",
"state",
".",
"arch... | Extract arguments and set them to
:param angr.sim_state.SimState state: The program state.
:param main: An argument to __libc_start_main.
:param argc: An argument to __libc_start_main.
:param argv: An argument to __libc_start_main.
:param init: An argument to __libc_start_main.
... | [
"Extract",
"arguments",
"and",
"set",
"them",
"to"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/procedures/glibc/__libc_start_main.py#L177-L210 | train | Extracts the arguments and set them to
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/backward_slice.py | BackwardSlice.dbg_repr | def dbg_repr(self, max_display=10):
"""
Debugging output of this slice.
:param max_display: The maximum number of SimRun slices to show.
:return: A string representation.
"""
s = repr(self) + "\n"
if len(self.chosen_statements) > max_display:
... | python | def dbg_repr(self, max_display=10):
"""
Debugging output of this slice.
:param max_display: The maximum number of SimRun slices to show.
:return: A string representation.
"""
s = repr(self) + "\n"
if len(self.chosen_statements) > max_display:
... | [
"def",
"dbg_repr",
"(",
"self",
",",
"max_display",
"=",
"10",
")",
":",
"s",
"=",
"repr",
"(",
"self",
")",
"+",
"\"\\n\"",
"if",
"len",
"(",
"self",
".",
"chosen_statements",
")",
">",
"max_display",
":",
"s",
"+=",
"\"%d SimRuns in program slice, displa... | Debugging output of this slice.
:param max_display: The maximum number of SimRun slices to show.
:return: A string representation. | [
"Debugging",
"output",
"of",
"this",
"slice",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/backward_slice.py#L97-L124 | train | Returns a string representation of the current slice. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/backward_slice.py | BackwardSlice.dbg_repr_run | def dbg_repr_run(self, run_addr):
"""
Debugging output of a single SimRun slice.
:param run_addr: Address of the SimRun.
:return: A string representation.
"""
if self.project.is_hooked(run_addr):
ss = "%#x Hooked\n" % run_addr
else:
... | python | def dbg_repr_run(self, run_addr):
"""
Debugging output of a single SimRun slice.
:param run_addr: Address of the SimRun.
:return: A string representation.
"""
if self.project.is_hooked(run_addr):
ss = "%#x Hooked\n" % run_addr
else:
... | [
"def",
"dbg_repr_run",
"(",
"self",
",",
"run_addr",
")",
":",
"if",
"self",
".",
"project",
".",
"is_hooked",
"(",
"run_addr",
")",
":",
"ss",
"=",
"\"%#x Hooked\\n\"",
"%",
"run_addr",
"else",
":",
"ss",
"=",
"\"%#x\\n\"",
"%",
"run_addr",
"# statements"... | Debugging output of a single SimRun slice.
:param run_addr: Address of the SimRun.
:return: A string representation. | [
"Debugging",
"output",
"of",
"a",
"single",
"SimRun",
"slice",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/backward_slice.py#L126-L166 | train | Returns a string representation of a single SimRun slice. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/backward_slice.py | BackwardSlice.annotated_cfg | def annotated_cfg(self, start_point=None):
"""
Returns an AnnotatedCFG based on slicing result.
"""
# TODO: Support context-sensitivity
targets = [ ]
for simrun, stmt_idx in self._targets:
targets.append((simrun.addr, stmt_idx))
l.debug("Initializi... | python | def annotated_cfg(self, start_point=None):
"""
Returns an AnnotatedCFG based on slicing result.
"""
# TODO: Support context-sensitivity
targets = [ ]
for simrun, stmt_idx in self._targets:
targets.append((simrun.addr, stmt_idx))
l.debug("Initializi... | [
"def",
"annotated_cfg",
"(",
"self",
",",
"start_point",
"=",
"None",
")",
":",
"# TODO: Support context-sensitivity",
"targets",
"=",
"[",
"]",
"for",
"simrun",
",",
"stmt_idx",
"in",
"self",
".",
"_targets",
":",
"targets",
".",
"append",
"(",
"(",
"simrun... | Returns an AnnotatedCFG based on slicing result. | [
"Returns",
"an",
"AnnotatedCFG",
"based",
"on",
"slicing",
"result",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/backward_slice.py#L168-L202 | train | Returns an AnnotatedCFG based on slicing result. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/backward_slice.py | BackwardSlice.is_taint_related_to_ip | def is_taint_related_to_ip(self, simrun_addr, stmt_idx, taint_type, simrun_whitelist=None):
"""
Query in taint graph to check if a specific taint will taint the IP in the future or not.
The taint is specified with the tuple (simrun_addr, stmt_idx, taint_type).
:param simrun_addr: ... | python | def is_taint_related_to_ip(self, simrun_addr, stmt_idx, taint_type, simrun_whitelist=None):
"""
Query in taint graph to check if a specific taint will taint the IP in the future or not.
The taint is specified with the tuple (simrun_addr, stmt_idx, taint_type).
:param simrun_addr: ... | [
"def",
"is_taint_related_to_ip",
"(",
"self",
",",
"simrun_addr",
",",
"stmt_idx",
",",
"taint_type",
",",
"simrun_whitelist",
"=",
"None",
")",
":",
"if",
"simrun_whitelist",
"is",
"None",
":",
"simrun_whitelist",
"=",
"set",
"(",
")",
"if",
"type",
"(",
"s... | Query in taint graph to check if a specific taint will taint the IP in the future or not.
The taint is specified with the tuple (simrun_addr, stmt_idx, taint_type).
:param simrun_addr: Address of the SimRun.
:param stmt_idx: Statement ID.
:param taint_type: T... | [
"Query",
"in",
"taint",
"graph",
"to",
"check",
"if",
"a",
"specific",
"taint",
"will",
"taint",
"the",
"IP",
"in",
"the",
"future",
"or",
"not",
".",
"The",
"taint",
"is",
"specified",
"with",
"the",
"tuple",
"(",
"simrun_addr",
"stmt_idx",
"taint_type",
... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/backward_slice.py#L204-L245 | train | Checks if a specific taint will taint the IP in the future or not. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/backward_slice.py | BackwardSlice._construct | def _construct(self, targets, control_flow_slice=False):
"""
Construct a dependency graph based on given parameters.
:param targets: A list of tuples like (CFGNode, statement ID)
:param control_flow_slice: Is the backward slicing only depends on CFG or not.
"""
... | python | def _construct(self, targets, control_flow_slice=False):
"""
Construct a dependency graph based on given parameters.
:param targets: A list of tuples like (CFGNode, statement ID)
:param control_flow_slice: Is the backward slicing only depends on CFG or not.
"""
... | [
"def",
"_construct",
"(",
"self",
",",
"targets",
",",
"control_flow_slice",
"=",
"False",
")",
":",
"if",
"control_flow_slice",
":",
"simruns",
"=",
"[",
"r",
"for",
"r",
",",
"_",
"in",
"targets",
"]",
"self",
".",
"_construct_control_flow_slice",
"(",
"... | Construct a dependency graph based on given parameters.
:param targets: A list of tuples like (CFGNode, statement ID)
:param control_flow_slice: Is the backward slicing only depends on CFG or not. | [
"Construct",
"a",
"dependency",
"graph",
"based",
"on",
"given",
"parameters",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/backward_slice.py#L291-L304 | train | Construct a dependency graph based on given parameters. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/backward_slice.py | BackwardSlice._construct_control_flow_slice | def _construct_control_flow_slice(self, simruns):
"""
Build a slice of the program without considering the effect of data dependencies.
This is an incorrect hack, but it should work fine with small programs.
:param simruns: A list of SimRun targets. You probably wanna get it from the CF... | python | def _construct_control_flow_slice(self, simruns):
"""
Build a slice of the program without considering the effect of data dependencies.
This is an incorrect hack, but it should work fine with small programs.
:param simruns: A list of SimRun targets. You probably wanna get it from the CF... | [
"def",
"_construct_control_flow_slice",
"(",
"self",
",",
"simruns",
")",
":",
"# TODO: Support context-sensitivity!",
"if",
"self",
".",
"_cfg",
"is",
"None",
":",
"l",
".",
"error",
"(",
"'Please build CFG first.'",
")",
"cfg",
"=",
"self",
".",
"_cfg",
".",
... | Build a slice of the program without considering the effect of data dependencies.
This is an incorrect hack, but it should work fine with small programs.
:param simruns: A list of SimRun targets. You probably wanna get it from the CFG somehow. It must exist in the
CFG. | [
"Build",
"a",
"slice",
"of",
"the",
"program",
"without",
"considering",
"the",
"effect",
"of",
"data",
"dependencies",
".",
"This",
"is",
"an",
"incorrect",
"hack",
"but",
"it",
"should",
"work",
"fine",
"with",
"small",
"programs",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/backward_slice.py#L306-L343 | train | Builds a slice of the program without considering the effect of data dependencies. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/backward_slice.py | BackwardSlice._construct_default | def _construct_default(self, targets):
"""
Create a backward slice from a specific statement in a specific block. This is done by traverse the CFG
backwards, and mark all tainted statements based on dependence graphs (CDG and DDG) provided initially. The
traversal terminated when we reac... | python | def _construct_default(self, targets):
"""
Create a backward slice from a specific statement in a specific block. This is done by traverse the CFG
backwards, and mark all tainted statements based on dependence graphs (CDG and DDG) provided initially. The
traversal terminated when we reac... | [
"def",
"_construct_default",
"(",
"self",
",",
"targets",
")",
":",
"# TODO: Support context-sensitivity",
"l",
".",
"debug",
"(",
"\"Constructing a default backward program slice\"",
")",
"self",
".",
"taint_graph",
"=",
"networkx",
".",
"DiGraph",
"(",
")",
"taints"... | Create a backward slice from a specific statement in a specific block. This is done by traverse the CFG
backwards, and mark all tainted statements based on dependence graphs (CDG and DDG) provided initially. The
traversal terminated when we reach the entry point, or when there is no unresolved dependenc... | [
"Create",
"a",
"backward",
"slice",
"from",
"a",
"specific",
"statement",
"in",
"a",
"specific",
"block",
".",
"This",
"is",
"done",
"by",
"traverse",
"the",
"CFG",
"backwards",
"and",
"mark",
"all",
"tainted",
"statements",
"based",
"on",
"dependence",
"gra... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/backward_slice.py#L345-L421 | train | Create a default backward slice from a list of statements. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/backward_slice.py | BackwardSlice._find_exits | def _find_exits(self, src_block, target_block):
"""
Source block has more than one exit, and through some of those exits, the control flow can eventually go to
the target block. This method returns exits that lead to the target block.
:param src_block: The block that has multiple ... | python | def _find_exits(self, src_block, target_block):
"""
Source block has more than one exit, and through some of those exits, the control flow can eventually go to
the target block. This method returns exits that lead to the target block.
:param src_block: The block that has multiple ... | [
"def",
"_find_exits",
"(",
"self",
",",
"src_block",
",",
"target_block",
")",
":",
"# Enumerate all statements and find exit statements",
"# Since we don't have a state, we have to rely on the pyvex block instead of SimIRSB",
"# Just create the block from pyvex again - not a big deal",
"i... | Source block has more than one exit, and through some of those exits, the control flow can eventually go to
the target block. This method returns exits that lead to the target block.
:param src_block: The block that has multiple exits.
:param target_block: The target block to reach.
... | [
"Source",
"block",
"has",
"more",
"than",
"one",
"exit",
"and",
"through",
"some",
"of",
"those",
"exits",
"the",
"control",
"flow",
"can",
"eventually",
"go",
"to",
"the",
"target",
"block",
".",
"This",
"method",
"returns",
"exits",
"that",
"lead",
"to",... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/backward_slice.py#L423-L491 | train | Find all exit statements that lead to the target block. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/backward_slice.py | BackwardSlice._handle_control_dependence | def _handle_control_dependence(self, target_node):
"""
Based on control dependence graph, pick all exits (statements) that lead to the target.
:param target_node: A CFGNode instance.
:returns: A set of new tainted code locations.
"""
new_taints = set()
... | python | def _handle_control_dependence(self, target_node):
"""
Based on control dependence graph, pick all exits (statements) that lead to the target.
:param target_node: A CFGNode instance.
:returns: A set of new tainted code locations.
"""
new_taints = set()
... | [
"def",
"_handle_control_dependence",
"(",
"self",
",",
"target_node",
")",
":",
"new_taints",
"=",
"set",
"(",
")",
"# Query the CDG and figure out all control flow transitions to reach this target",
"cdg_guardians",
"=",
"self",
".",
"_cdg",
".",
"get_guardians",
"(",
"t... | Based on control dependence graph, pick all exits (statements) that lead to the target.
:param target_node: A CFGNode instance.
:returns: A set of new tainted code locations. | [
"Based",
"on",
"control",
"dependence",
"graph",
"pick",
"all",
"exits",
"(",
"statements",
")",
"that",
"lead",
"to",
"the",
"target",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/backward_slice.py#L493-L559 | train | Internal method that handles control dependence of a CFGNode. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/backward_slice.py | BackwardSlice._map_to_cfg | def _map_to_cfg(self):
"""
Map our current slice to CFG.
Based on self._statements_per_run and self._exit_statements_per_run, this method will traverse the CFG and
check if there is any missing block on the path. If there is, the default exit of that missing block will be
includ... | python | def _map_to_cfg(self):
"""
Map our current slice to CFG.
Based on self._statements_per_run and self._exit_statements_per_run, this method will traverse the CFG and
check if there is any missing block on the path. If there is, the default exit of that missing block will be
includ... | [
"def",
"_map_to_cfg",
"(",
"self",
")",
":",
"exit_statements_per_run",
"=",
"self",
".",
"chosen_exits",
"new_exit_statements_per_run",
"=",
"defaultdict",
"(",
"list",
")",
"while",
"len",
"(",
"exit_statements_per_run",
")",
":",
"for",
"block_address",
",",
"e... | Map our current slice to CFG.
Based on self._statements_per_run and self._exit_statements_per_run, this method will traverse the CFG and
check if there is any missing block on the path. If there is, the default exit of that missing block will be
included in the slice. This is because Slicecutor... | [
"Map",
"our",
"current",
"slice",
"to",
"CFG",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/backward_slice.py#L561-L592 | train | Map our current slice to CFG. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/backward_slice.py | BackwardSlice._pick_statement | def _pick_statement(self, block_address, stmt_idx):
"""
Include a statement in the final slice.
:param int block_address: Address of the basic block.
:param int stmt_idx: Statement ID.
"""
# TODO: Support context-sensitivity
# Sanity check
if n... | python | def _pick_statement(self, block_address, stmt_idx):
"""
Include a statement in the final slice.
:param int block_address: Address of the basic block.
:param int stmt_idx: Statement ID.
"""
# TODO: Support context-sensitivity
# Sanity check
if n... | [
"def",
"_pick_statement",
"(",
"self",
",",
"block_address",
",",
"stmt_idx",
")",
":",
"# TODO: Support context-sensitivity",
"# Sanity check",
"if",
"not",
"isinstance",
"(",
"block_address",
",",
"int",
")",
":",
"raise",
"AngrBackwardSlicingError",
"(",
"\"Invalid... | Include a statement in the final slice.
:param int block_address: Address of the basic block.
:param int stmt_idx: Statement ID. | [
"Include",
"a",
"statement",
"in",
"the",
"final",
"slice",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/backward_slice.py#L594-L610 | train | Pick a statement in the final slice. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/backward_slice.py | BackwardSlice._pick_exit | def _pick_exit(self, block_address, stmt_idx, target_ips):
"""
Include an exit in the final slice.
:param block_address: Address of the basic block.
:param stmt_idx: ID of the exit statement.
:param target_ips: The target address of this exit statement.
"""... | python | def _pick_exit(self, block_address, stmt_idx, target_ips):
"""
Include an exit in the final slice.
:param block_address: Address of the basic block.
:param stmt_idx: ID of the exit statement.
:param target_ips: The target address of this exit statement.
"""... | [
"def",
"_pick_exit",
"(",
"self",
",",
"block_address",
",",
"stmt_idx",
",",
"target_ips",
")",
":",
"# TODO: Support context-sensitivity",
"tpl",
"=",
"(",
"stmt_idx",
",",
"target_ips",
")",
"if",
"tpl",
"not",
"in",
"self",
".",
"chosen_exits",
"[",
"block... | Include an exit in the final slice.
:param block_address: Address of the basic block.
:param stmt_idx: ID of the exit statement.
:param target_ips: The target address of this exit statement. | [
"Include",
"an",
"exit",
"in",
"the",
"final",
"slice",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/backward_slice.py#L612-L625 | train | Picks an exit from the final slice. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/backward_slice.py | BackwardSlice._conditional_exits | def _conditional_exits(self, block_addr):
"""
Return a list of conditional statement exits with respect to a basic block.
:param block_addr: The address of the basic block.
:return: A list of statement IDs.
"""
vex_block = self.project.factory.block(block_ad... | python | def _conditional_exits(self, block_addr):
"""
Return a list of conditional statement exits with respect to a basic block.
:param block_addr: The address of the basic block.
:return: A list of statement IDs.
"""
vex_block = self.project.factory.block(block_ad... | [
"def",
"_conditional_exits",
"(",
"self",
",",
"block_addr",
")",
":",
"vex_block",
"=",
"self",
".",
"project",
".",
"factory",
".",
"block",
"(",
"block_addr",
")",
".",
"vex",
"lst",
"=",
"[",
"]",
"for",
"i",
",",
"stmt",
"in",
"enumerate",
"(",
... | Return a list of conditional statement exits with respect to a basic block.
:param block_addr: The address of the basic block.
:return: A list of statement IDs. | [
"Return",
"a",
"list",
"of",
"conditional",
"statement",
"exits",
"with",
"respect",
"to",
"a",
"basic",
"block",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/backward_slice.py#L631-L646 | train | Return a list of conditional statements with respect to a basic block. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/backward_slice.py | BackwardSlice._normalize_stmt_idx | def _normalize_stmt_idx(self, block_addr, stmt_idx):
"""
For each statement ID, convert 'default' to (last_stmt_idx+1)
:param block_addr: The block address.
:param stmt_idx: Statement ID.
:returns: New statement ID.
"""
if type(stmt_idx) is int:
... | python | def _normalize_stmt_idx(self, block_addr, stmt_idx):
"""
For each statement ID, convert 'default' to (last_stmt_idx+1)
:param block_addr: The block address.
:param stmt_idx: Statement ID.
:returns: New statement ID.
"""
if type(stmt_idx) is int:
... | [
"def",
"_normalize_stmt_idx",
"(",
"self",
",",
"block_addr",
",",
"stmt_idx",
")",
":",
"if",
"type",
"(",
"stmt_idx",
")",
"is",
"int",
":",
"return",
"stmt_idx",
"if",
"stmt_idx",
"==",
"DEFAULT_STATEMENT",
":",
"vex_block",
"=",
"self",
".",
"project",
... | For each statement ID, convert 'default' to (last_stmt_idx+1)
:param block_addr: The block address.
:param stmt_idx: Statement ID.
:returns: New statement ID. | [
"For",
"each",
"statement",
"ID",
"convert",
"default",
"to",
"(",
"last_stmt_idx",
"+",
"1",
")"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/backward_slice.py#L648-L664 | train | Normalizes the statement ID. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/backward_slice.py | BackwardSlice._last_branching_statement | def _last_branching_statement(statements):
"""
Search for the last branching exit, just like
# if (t12) { PUT(184) = 0xBADF00D:I64; exit-Boring }
and then taint the temp variable inside if predicate
"""
cmp_stmt_id = None
cmp_tmp_id = None
total_stmts = ... | python | def _last_branching_statement(statements):
"""
Search for the last branching exit, just like
# if (t12) { PUT(184) = 0xBADF00D:I64; exit-Boring }
and then taint the temp variable inside if predicate
"""
cmp_stmt_id = None
cmp_tmp_id = None
total_stmts = ... | [
"def",
"_last_branching_statement",
"(",
"statements",
")",
":",
"cmp_stmt_id",
"=",
"None",
"cmp_tmp_id",
"=",
"None",
"total_stmts",
"=",
"len",
"(",
"statements",
")",
"statements",
"=",
"reversed",
"(",
"statements",
")",
"for",
"stmt_rev_idx",
",",
"stmt",
... | Search for the last branching exit, just like
# if (t12) { PUT(184) = 0xBADF00D:I64; exit-Boring }
and then taint the temp variable inside if predicate | [
"Search",
"for",
"the",
"last",
"branching",
"exit",
"just",
"like",
"#",
"if",
"(",
"t12",
")",
"{",
"PUT",
"(",
"184",
")",
"=",
"0xBADF00D",
":",
"I64",
";",
"exit",
"-",
"Boring",
"}",
"and",
"then",
"taint",
"the",
"temp",
"variable",
"inside",
... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/backward_slice.py#L667-L683 | train | Search for the last branching exit and taint the temp variable inside if predicate
is True | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/engines/soot/statements/base.py | SimSootStmt._get_bb_addr_from_instr | def _get_bb_addr_from_instr(self, instr):
"""
Returns the address of the methods basic block that contains the given
instruction.
:param instr: The index of the instruction (within the current method).
:rtype: SootAddressDescriptor
"""
current_method = self.state... | python | def _get_bb_addr_from_instr(self, instr):
"""
Returns the address of the methods basic block that contains the given
instruction.
:param instr: The index of the instruction (within the current method).
:rtype: SootAddressDescriptor
"""
current_method = self.state... | [
"def",
"_get_bb_addr_from_instr",
"(",
"self",
",",
"instr",
")",
":",
"current_method",
"=",
"self",
".",
"state",
".",
"addr",
".",
"method",
"try",
":",
"bb",
"=",
"current_method",
".",
"block_by_label",
"[",
"instr",
"]",
"except",
"KeyError",
":",
"l... | Returns the address of the methods basic block that contains the given
instruction.
:param instr: The index of the instruction (within the current method).
:rtype: SootAddressDescriptor | [
"Returns",
"the",
"address",
"of",
"the",
"methods",
"basic",
"block",
"that",
"contains",
"the",
"given",
"instruction",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/engines/soot/statements/base.py#L41-L57 | train | Returns the address of the methods basic block that contains the given instruction. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/fast_memory.py | SimFastMemory._handle_uninitialized_read | def _handle_uninitialized_read(self, addr, inspect=True, events=True):
"""
The default uninitialized read handler. Returns symbolic bytes.
"""
if self._uninitialized_read_handler is None:
v = self.state.solver.Unconstrained("%s_%s" % (self.id, addr), self.width*self.state.arc... | python | def _handle_uninitialized_read(self, addr, inspect=True, events=True):
"""
The default uninitialized read handler. Returns symbolic bytes.
"""
if self._uninitialized_read_handler is None:
v = self.state.solver.Unconstrained("%s_%s" % (self.id, addr), self.width*self.state.arc... | [
"def",
"_handle_uninitialized_read",
"(",
"self",
",",
"addr",
",",
"inspect",
"=",
"True",
",",
"events",
"=",
"True",
")",
":",
"if",
"self",
".",
"_uninitialized_read_handler",
"is",
"None",
":",
"v",
"=",
"self",
".",
"state",
".",
"solver",
".",
"Un... | The default uninitialized read handler. Returns symbolic bytes. | [
"The",
"default",
"uninitialized",
"read",
"handler",
".",
"Returns",
"symbolic",
"bytes",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/fast_memory.py#L42-L50 | train | Internal method to handle uninitialized read. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/fast_memory.py | SimFastMemory._translate_addr | def _translate_addr(self, a): #pylint:disable=no-self-use
"""
Resolves this address.
"""
if isinstance(a, claripy.ast.Base) and not a.singlevalued:
raise SimFastMemoryError("address not supported")
return self.state.solver.eval(a) | python | def _translate_addr(self, a): #pylint:disable=no-self-use
"""
Resolves this address.
"""
if isinstance(a, claripy.ast.Base) and not a.singlevalued:
raise SimFastMemoryError("address not supported")
return self.state.solver.eval(a) | [
"def",
"_translate_addr",
"(",
"self",
",",
"a",
")",
":",
"#pylint:disable=no-self-use",
"if",
"isinstance",
"(",
"a",
",",
"claripy",
".",
"ast",
".",
"Base",
")",
"and",
"not",
"a",
".",
"singlevalued",
":",
"raise",
"SimFastMemoryError",
"(",
"\"address ... | Resolves this address. | [
"Resolves",
"this",
"address",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/fast_memory.py#L52-L58 | train | Translate an address into a value. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/fast_memory.py | SimFastMemory._translate_size | def _translate_size(self, s): #pylint:disable=no-self-use
"""
Checks whether this size can be supported by FastMemory."
"""
if isinstance(s, claripy.ast.Base) and not s.singlevalued:
raise SimFastMemoryError("size not supported")
if s is None:
return s
... | python | def _translate_size(self, s): #pylint:disable=no-self-use
"""
Checks whether this size can be supported by FastMemory."
"""
if isinstance(s, claripy.ast.Base) and not s.singlevalued:
raise SimFastMemoryError("size not supported")
if s is None:
return s
... | [
"def",
"_translate_size",
"(",
"self",
",",
"s",
")",
":",
"#pylint:disable=no-self-use",
"if",
"isinstance",
"(",
"s",
",",
"claripy",
".",
"ast",
".",
"Base",
")",
"and",
"not",
"s",
".",
"singlevalued",
":",
"raise",
"SimFastMemoryError",
"(",
"\"size not... | Checks whether this size can be supported by FastMemory." | [
"Checks",
"whether",
"this",
"size",
"can",
"be",
"supported",
"by",
"FastMemory",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/fast_memory.py#L66-L74 | train | Checks whether this size can be supported by FastMemory. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/fast_memory.py | SimFastMemory._translate_cond | def _translate_cond(self, c): #pylint:disable=no-self-use
"""
Checks whether this condition can be supported by FastMemory."
"""
if isinstance(c, claripy.ast.Base) and not c.singlevalued:
raise SimFastMemoryError("size not supported")
if c is None:
return ... | python | def _translate_cond(self, c): #pylint:disable=no-self-use
"""
Checks whether this condition can be supported by FastMemory."
"""
if isinstance(c, claripy.ast.Base) and not c.singlevalued:
raise SimFastMemoryError("size not supported")
if c is None:
return ... | [
"def",
"_translate_cond",
"(",
"self",
",",
"c",
")",
":",
"#pylint:disable=no-self-use",
"if",
"isinstance",
"(",
"c",
",",
"claripy",
".",
"ast",
".",
"Base",
")",
"and",
"not",
"c",
".",
"singlevalued",
":",
"raise",
"SimFastMemoryError",
"(",
"\"size not... | Checks whether this condition can be supported by FastMemory." | [
"Checks",
"whether",
"this",
"condition",
"can",
"be",
"supported",
"by",
"FastMemory",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/fast_memory.py#L76-L85 | train | Checks whether this condition can be supported by FastMemory. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/fast_memory.py | SimFastMemory._resolve_access | def _resolve_access(self, addr, size):
"""
Resolves a memory access of a certain size. Returns a sequence of the bases, offsets, and sizes of the accesses required
to fulfil this.
"""
# if we fit in one word
first_offset = addr % self.width
first_base = addr - fi... | python | def _resolve_access(self, addr, size):
"""
Resolves a memory access of a certain size. Returns a sequence of the bases, offsets, and sizes of the accesses required
to fulfil this.
"""
# if we fit in one word
first_offset = addr % self.width
first_base = addr - fi... | [
"def",
"_resolve_access",
"(",
"self",
",",
"addr",
",",
"size",
")",
":",
"# if we fit in one word",
"first_offset",
"=",
"addr",
"%",
"self",
".",
"width",
"first_base",
"=",
"addr",
"-",
"first_offset",
"if",
"first_offset",
"+",
"size",
"<=",
"self",
"."... | Resolves a memory access of a certain size. Returns a sequence of the bases, offsets, and sizes of the accesses required
to fulfil this. | [
"Resolves",
"a",
"memory",
"access",
"of",
"a",
"certain",
"size",
".",
"Returns",
"a",
"sequence",
"of",
"the",
"bases",
"offsets",
"and",
"sizes",
"of",
"the",
"accesses",
"required",
"to",
"fulfil",
"this",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/fast_memory.py#L87-L108 | train | Resolves a memory access of a certain size. Returns a sequence of bases offsets and sizes of the accesses required by this module. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/fast_memory.py | SimFastMemory._single_load | def _single_load(self, addr, offset, size, inspect=True, events=True):
"""
Performs a single load.
"""
try:
d = self._contents[addr]
except KeyError:
d = self._handle_uninitialized_read(addr, inspect=inspect, events=events)
self._contents[addr]... | python | def _single_load(self, addr, offset, size, inspect=True, events=True):
"""
Performs a single load.
"""
try:
d = self._contents[addr]
except KeyError:
d = self._handle_uninitialized_read(addr, inspect=inspect, events=events)
self._contents[addr]... | [
"def",
"_single_load",
"(",
"self",
",",
"addr",
",",
"offset",
",",
"size",
",",
"inspect",
"=",
"True",
",",
"events",
"=",
"True",
")",
":",
"try",
":",
"d",
"=",
"self",
".",
"_contents",
"[",
"addr",
"]",
"except",
"KeyError",
":",
"d",
"=",
... | Performs a single load. | [
"Performs",
"a",
"single",
"load",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/fast_memory.py#L110-L123 | train | Performs a single load of a single object. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/fast_memory.py | SimFastMemory._single_store | def _single_store(self, addr, offset, size, data):
"""
Performs a single store.
"""
if offset == 0 and size == self.width:
self._contents[addr] = data
elif offset == 0:
cur = self._single_load(addr, size, self.width - size)
self._contents[addr... | python | def _single_store(self, addr, offset, size, data):
"""
Performs a single store.
"""
if offset == 0 and size == self.width:
self._contents[addr] = data
elif offset == 0:
cur = self._single_load(addr, size, self.width - size)
self._contents[addr... | [
"def",
"_single_store",
"(",
"self",
",",
"addr",
",",
"offset",
",",
"size",
",",
"data",
")",
":",
"if",
"offset",
"==",
"0",
"and",
"size",
"==",
"self",
".",
"width",
":",
"self",
".",
"_contents",
"[",
"addr",
"]",
"=",
"data",
"elif",
"offset... | Performs a single store. | [
"Performs",
"a",
"single",
"store",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/fast_memory.py#L125-L142 | train | Performs a single store. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/fast_memory.py | SimFastMemory.changed_bytes | def changed_bytes(self, other):
"""
Gets the set of changed bytes between self and other.
"""
changes = set()
l.warning("FastMemory.changed_bytes(): This implementation is very slow and only for debug purposes.")
for addr,v in self._contents.items():
for i i... | python | def changed_bytes(self, other):
"""
Gets the set of changed bytes between self and other.
"""
changes = set()
l.warning("FastMemory.changed_bytes(): This implementation is very slow and only for debug purposes.")
for addr,v in self._contents.items():
for i i... | [
"def",
"changed_bytes",
"(",
"self",
",",
"other",
")",
":",
"changes",
"=",
"set",
"(",
")",
"l",
".",
"warning",
"(",
"\"FastMemory.changed_bytes(): This implementation is very slow and only for debug purposes.\"",
")",
"for",
"addr",
",",
"v",
"in",
"self",
".",
... | Gets the set of changed bytes between self and other. | [
"Gets",
"the",
"set",
"of",
"changed",
"bytes",
"between",
"self",
"and",
"other",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/fast_memory.py#L213-L228 | train | Gets the set of bytes that have been changed between self and other. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/binary_optimizer.py | BinaryOptimizer._redundant_stack_variable_removal | def _redundant_stack_variable_removal(self, function, data_graph):
"""
If an argument passed from the stack (i.e. dword ptr [ebp+4h]) is saved to a local variable on the stack at the
beginning of the function, and this local variable was never modified anywhere in this function, and no pointer
... | python | def _redundant_stack_variable_removal(self, function, data_graph):
"""
If an argument passed from the stack (i.e. dword ptr [ebp+4h]) is saved to a local variable on the stack at the
beginning of the function, and this local variable was never modified anywhere in this function, and no pointer
... | [
"def",
"_redundant_stack_variable_removal",
"(",
"self",
",",
"function",
",",
"data_graph",
")",
":",
"# check if there is any stack pointer being stored into any register other than esp",
"# basically check all consumers of stack pointers",
"stack_ptrs",
"=",
"[",
"]",
"sp_offset",... | If an argument passed from the stack (i.e. dword ptr [ebp+4h]) is saved to a local variable on the stack at the
beginning of the function, and this local variable was never modified anywhere in this function, and no pointer
of any stack variable is saved in any register, then we can replace all referenc... | [
"If",
"an",
"argument",
"passed",
"from",
"the",
"stack",
"(",
"i",
".",
"e",
".",
"dword",
"ptr",
"[",
"ebp",
"+",
"4h",
"]",
")",
"is",
"saved",
"to",
"a",
"local",
"variable",
"on",
"the",
"stack",
"at",
"the",
"beginning",
"of",
"the",
"functio... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/binary_optimizer.py#L242-L352 | train | This function checks if any argument passed from the stack is not a redundant stack variable. If so we can remove all the argument variables that are not redundant. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/binary_optimizer.py | BinaryOptimizer._register_reallocation | def _register_reallocation(self, function, data_graph):
"""
Find unused registers throughout the function, and use those registers to replace stack variables.
Only functions that satisfy the following criteria can be optimized in this way:
- The function does not call any other function... | python | def _register_reallocation(self, function, data_graph):
"""
Find unused registers throughout the function, and use those registers to replace stack variables.
Only functions that satisfy the following criteria can be optimized in this way:
- The function does not call any other function... | [
"def",
"_register_reallocation",
"(",
"self",
",",
"function",
",",
"data_graph",
")",
":",
"# make sure this function does not call other functions",
"if",
"function",
".",
"callout_sites",
":",
"return",
"if",
"len",
"(",
"function",
".",
"endpoints",
")",
"!=",
"... | Find unused registers throughout the function, and use those registers to replace stack variables.
Only functions that satisfy the following criteria can be optimized in this way:
- The function does not call any other function.
- The function does not use esp to index any stack variable.
... | [
"Find",
"unused",
"registers",
"throughout",
"the",
"function",
"and",
"use",
"those",
"registers",
"to",
"replace",
"stack",
"variables",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/binary_optimizer.py#L354-L614 | train | This method is used to register reallocation of a function. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/binary_optimizer.py | BinaryOptimizer._dead_assignment_elimination | def _dead_assignment_elimination(self, function, data_graph): #pylint:disable=unused-argument
"""
Remove assignments to registers that has no consumers, but immediately killed.
BROKEN - DO NOT USE IT
:param angr.knowledge.Function function:
:param networkx.MultiDiGraph data_gr... | python | def _dead_assignment_elimination(self, function, data_graph): #pylint:disable=unused-argument
"""
Remove assignments to registers that has no consumers, but immediately killed.
BROKEN - DO NOT USE IT
:param angr.knowledge.Function function:
:param networkx.MultiDiGraph data_gr... | [
"def",
"_dead_assignment_elimination",
"(",
"self",
",",
"function",
",",
"data_graph",
")",
":",
"#pylint:disable=unused-argument",
"register_pvs",
"=",
"set",
"(",
")",
"for",
"node",
"in",
"data_graph",
".",
"nodes",
"(",
")",
":",
"if",
"isinstance",
"(",
... | Remove assignments to registers that has no consumers, but immediately killed.
BROKEN - DO NOT USE IT
:param angr.knowledge.Function function:
:param networkx.MultiDiGraph data_graph:
:return: None | [
"Remove",
"assignments",
"to",
"registers",
"that",
"has",
"no",
"consumers",
"but",
"immediately",
"killed",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/binary_optimizer.py#L616-L648 | train | Remove assignments to registers that have no consumers but immediately killed. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/simos/windows.py | SimWindows.initialize_segment_register_x64 | def initialize_segment_register_x64(self, state, concrete_target):
"""
Set the gs register in the angr to the value of the fs register in the concrete process
:param state: state which will be modified
:param concrete_target: concrete target that will be used to read t... | python | def initialize_segment_register_x64(self, state, concrete_target):
"""
Set the gs register in the angr to the value of the fs register in the concrete process
:param state: state which will be modified
:param concrete_target: concrete target that will be used to read t... | [
"def",
"initialize_segment_register_x64",
"(",
"self",
",",
"state",
",",
"concrete_target",
")",
":",
"_l",
".",
"debug",
"(",
"\"Synchronizing gs segment register\"",
")",
"state",
".",
"regs",
".",
"gs",
"=",
"self",
".",
"_read_gs_register_x64",
"(",
"concrete... | Set the gs register in the angr to the value of the fs register in the concrete process
:param state: state which will be modified
:param concrete_target: concrete target that will be used to read the fs register
:return: None | [
"Set",
"the",
"gs",
"register",
"in",
"the",
"angr",
"to",
"the",
"value",
"of",
"the",
"fs",
"register",
"in",
"the",
"concrete",
"process"
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/simos/windows.py#L465-L474 | train | Initialize the gs register in the angr to the value of the fs register in the concrete target. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/simos/windows.py | SimWindows.initialize_gdt_x86 | def initialize_gdt_x86(self, state, concrete_target):
"""
Create a GDT in the state memory and populate the segment registers.
:param state: state which will be modified
:param concrete_target: concrete target that will be used to read the fs register
:return: ... | python | def initialize_gdt_x86(self, state, concrete_target):
"""
Create a GDT in the state memory and populate the segment registers.
:param state: state which will be modified
:param concrete_target: concrete target that will be used to read the fs register
:return: ... | [
"def",
"initialize_gdt_x86",
"(",
"self",
",",
"state",
",",
"concrete_target",
")",
":",
"_l",
".",
"debug",
"(",
"\"Creating Global Descriptor Table and synchronizing fs segment register\"",
")",
"fs",
"=",
"self",
".",
"_read_fs_register_x86",
"(",
"concrete_target",
... | Create a GDT in the state memory and populate the segment registers.
:param state: state which will be modified
:param concrete_target: concrete target that will be used to read the fs register
:return: the created GlobalDescriptorTable object | [
"Create",
"a",
"GDT",
"in",
"the",
"state",
"memory",
"and",
"populate",
"the",
"segment",
"registers",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/simos/windows.py#L476-L488 | train | Create a Global Descriptor Table in the state memory and populate the segment registers. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/jni_references.py | SimStateJNIReferences.lookup | def lookup(self, opaque_ref):
"""
Lookups the object that was used for creating the reference.
"""
opaque_ref_value = self._get_reference_value(opaque_ref)
# check local refs
if opaque_ref_value in self.local_refs:
return self.local_refs[opaque_ref_value]
... | python | def lookup(self, opaque_ref):
"""
Lookups the object that was used for creating the reference.
"""
opaque_ref_value = self._get_reference_value(opaque_ref)
# check local refs
if opaque_ref_value in self.local_refs:
return self.local_refs[opaque_ref_value]
... | [
"def",
"lookup",
"(",
"self",
",",
"opaque_ref",
")",
":",
"opaque_ref_value",
"=",
"self",
".",
"_get_reference_value",
"(",
"opaque_ref",
")",
"# check local refs",
"if",
"opaque_ref_value",
"in",
"self",
".",
"local_refs",
":",
"return",
"self",
".",
"local_r... | Lookups the object that was used for creating the reference. | [
"Lookups",
"the",
"object",
"that",
"was",
"used",
"for",
"creating",
"the",
"reference",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/jni_references.py#L21-L33 | train | Lookups the object that was used for creating the reference. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/jni_references.py | SimStateJNIReferences.create_new_reference | def create_new_reference(self, obj, global_ref=False):
"""
Create a new reference thats maps to the given object.
:param obj: Object which gets referenced.
:param bool global_ref: Whether a local or global reference is created.
"""
# get an unique address
... | python | def create_new_reference(self, obj, global_ref=False):
"""
Create a new reference thats maps to the given object.
:param obj: Object which gets referenced.
:param bool global_ref: Whether a local or global reference is created.
"""
# get an unique address
... | [
"def",
"create_new_reference",
"(",
"self",
",",
"obj",
",",
"global_ref",
"=",
"False",
")",
":",
"# get an unique address",
"opaque_ref",
"=",
"self",
".",
"state",
".",
"project",
".",
"loader",
".",
"extern_object",
".",
"allocate",
"(",
")",
"# map the ob... | Create a new reference thats maps to the given object.
:param obj: Object which gets referenced.
:param bool global_ref: Whether a local or global reference is created. | [
"Create",
"a",
"new",
"reference",
"thats",
"maps",
"to",
"the",
"given",
"object",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/jni_references.py#L35-L50 | train | Create a new reference that maps to the given object. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/state_plugins/jni_references.py | SimStateJNIReferences.delete_reference | def delete_reference(self, opaque_ref, global_ref=False):
"""
Delete the stored mapping of a reference.
:param opaque_ref: Reference which should be removed.
:param bool global_ref: Whether opaque_ref is a local or global
reference.
"""
... | python | def delete_reference(self, opaque_ref, global_ref=False):
"""
Delete the stored mapping of a reference.
:param opaque_ref: Reference which should be removed.
:param bool global_ref: Whether opaque_ref is a local or global
reference.
"""
... | [
"def",
"delete_reference",
"(",
"self",
",",
"opaque_ref",
",",
"global_ref",
"=",
"False",
")",
":",
"opaque_ref_value",
"=",
"self",
".",
"_get_reference_value",
"(",
"opaque_ref",
")",
"if",
"global_ref",
":",
"del",
"self",
".",
"global_refs",
"[",
"opaque... | Delete the stored mapping of a reference.
:param opaque_ref: Reference which should be removed.
:param bool global_ref: Whether opaque_ref is a local or global
reference. | [
"Delete",
"the",
"stored",
"mapping",
"of",
"a",
"reference",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/state_plugins/jni_references.py#L58-L70 | train | Deletes the stored mapping of a reference. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/cfg/cfg_fast.py | PendingJobs.pop_job | def pop_job(self, returning=True):
"""
Pop a job from the pending jobs list.
When returning == True, we prioritize the jobs whose functions are known to be returning (function.returning is
True). As an optimization, we are sorting the pending jobs list according to job.function.returnin... | python | def pop_job(self, returning=True):
"""
Pop a job from the pending jobs list.
When returning == True, we prioritize the jobs whose functions are known to be returning (function.returning is
True). As an optimization, we are sorting the pending jobs list according to job.function.returnin... | [
"def",
"pop_job",
"(",
"self",
",",
"returning",
"=",
"True",
")",
":",
"if",
"not",
"self",
":",
"return",
"None",
"if",
"not",
"returning",
":",
"return",
"self",
".",
"_pop_job",
"(",
"next",
"(",
"reversed",
"(",
"self",
".",
"_jobs",
".",
"keys"... | Pop a job from the pending jobs list.
When returning == True, we prioritize the jobs whose functions are known to be returning (function.returning is
True). As an optimization, we are sorting the pending jobs list according to job.function.returning.
:param bool returning: Only pop a pending j... | [
"Pop",
"a",
"job",
"from",
"the",
"pending",
"jobs",
"list",
"."
] | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L102-L126 | train | Pops a pending job from the pending jobs list. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
angr/angr | angr/analyses/cfg/cfg_fast.py | PendingJobs.cleanup | def cleanup(self):
"""
Remove those pending exits if:
a) they are the return exits of non-returning SimProcedures
b) they are the return exits of non-returning syscalls
b) they are the return exits of non-returning functions
:return: None
"""
pending_exi... | python | def cleanup(self):
"""
Remove those pending exits if:
a) they are the return exits of non-returning SimProcedures
b) they are the return exits of non-returning syscalls
b) they are the return exits of non-returning functions
:return: None
"""
pending_exi... | [
"def",
"cleanup",
"(",
"self",
")",
":",
"pending_exits_to_remove",
"=",
"defaultdict",
"(",
"list",
")",
"for",
"func_addr",
"in",
"self",
".",
"_updated_functions",
":",
"if",
"func_addr",
"not",
"in",
"self",
".",
"_jobs",
":",
"continue",
"jobs",
"=",
... | Remove those pending exits if:
a) they are the return exits of non-returning SimProcedures
b) they are the return exits of non-returning syscalls
b) they are the return exits of non-returning functions
:return: None | [
"Remove",
"those",
"pending",
"exits",
"if",
":",
"a",
")",
"they",
"are",
"the",
"return",
"exits",
"of",
"non",
"-",
"returning",
"SimProcedures",
"b",
")",
"they",
"are",
"the",
"return",
"exits",
"of",
"non",
"-",
"returning",
"syscalls",
"b",
")",
... | 4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40 | https://github.com/angr/angr/blob/4e2f97d56af5419ee73bdb30482c8dd8ff5f3e40/angr/analyses/cfg/cfg_fast.py#L128-L171 | train | Removes all pending exit and remove all functions that are not returning. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.