Skip to content

Callgraph Generation ignores <clinit> #459

@JonasKlauke

Description

@JonasKlauke

Currently, the Call graph generation does not analyze the clinit.
Therefore, method calls in the static area are missed and RTA does not know which classes are instantiated in the static area.

Code snippet with both problems

public class B{
    public int foo(){return 8;}
}

public class C extends B{
    public int foo(){return 3;}
    public static C build () {return new C();}
}
public class A {
  static C c=C.build();
  public static void main(String[] args) {
    B b=c;
    b.foo
  }
}
  • unit test for method calls in clinit
  • unit test for instantiated classes in clinit for RTA
  • analyze cinit in the worklist

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions