zoukankan      html  css  js  c++  java
  • Proj THUDBFuzz Paper Reading: 南京大学软件分析课程2020, 07 Interprocedural Analysis

    Motivation

    目的:处理method calls
    方法:沿着interprocedural control-flow edges将数据流信息传播过去(一般是call/return edges)

    Call graph construction

    Call graph construction in Java

    • Class hierarchy analysis(CHA)
    • Rapid type analysis(RTA)
    • Variable type analysis(VTA)
    • Pointer analysis(k-CFA)
      这些方法的精度依次上升,效率当然随之下降。
      java的函数调用有4种: invokestatic, invokepspecial, invokeinterface和invokevirtual。接口和虚函数都牵扯到无法确定具体调用的是哪个方法这一问题。

    Class hierarchy analysis(CHA)

    处理invokevirtual:virtual call调用哪个方法与当前变量的类别(the type of the receiver object)和invokevirtual后面跟的函数签名(method signature at the call site)有关。

    • Signature = class type+ method name + descriptor
    • Descriptor= return type+ parameter types

    根据superclass的关系,从子类一路向父类找,直到找到name和descriptor相同的方法,此时就认为调用了该方法。

    IDEA中有内嵌CHA算法。

    Interprocedural Control Flow Graph


    Interprocedural Data-flow Analysis

    需要注意作用域的问题,有些变量不再可访问。

  • 相关阅读:
    背水一战 Windows 10 (26)
    背水一战 Windows 10 (25)
    背水一战 Windows 10 (24)
    背水一战 Windows 10 (23)
    背水一战 Windows 10 (22)
    背水一战 Windows 10 (21)
    背水一战 Windows 10 (20)
    背水一战 Windows 10 (19)
    背水一战 Windows 10 (18)
    背水一战 Windows 10 (17)
  • 原文地址:https://www.cnblogs.com/xuesu/p/14321627.html
Copyright © 2011-2022 走看看