Conversation
|
@linghuiluo Hi, your fix seems correct now according to its specification (i.e., " Returns a list of all clinits of class cl and its superclasses."). But it still misses "<soot.IA: void clinit()>" which I mentioned in the example in #1602 and thus still affects the on-the-fly callgraph construction. |
|
@DongjieHe That edge from main to IA.clinit is not there, because there is no method with the signature IA.clinit in the IR. |
|
@DongjieHe Below is description from Java spec, it basically means there is no static initializer in IA at all, because you only have a String field in IA: Note that interface fields that are constant variables (§4.12.4) are initialized before other interface fields. This also applies to static fields that are constant variables in classes (§8.3.2). Such fields will never be observed to have their default initial values (§4.12.5), even by devious programs. A constant variable is a final variable of primitive type or type String that is initialized with a constant expression (§15.28). Whether a variable is a constant variable or not may have implications with respect to class initialization (§12.4.1), binary compatibility (§13.1, §13.4.9), and definite assignment (§16 (Definite Assignment)). |
The bug in #1602 affects the call graph, because the
EntryPoints.clinitOfis used in the call graph construction.This patch fixes the missing edges to some static initializers.