graph_generator.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:sigpath 作者: utds3lab 项目源码 文件源码
def _remove_unreachable_nodes(graph):
    """Remove all data structures that are not reachable
    from modules or from stacks.
    """
    removed = 0
    for node in graph.nodes()[:]:
        # check if reachable from globals
        for root in graph.root_nodes:
            if nx.has_path(graph, root, node):
                break
        else:
            graph.remove_node(node)
            removed += 1
    return removed
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号