soot icon indicating copy to clipboard operation
soot copied to clipboard

Maybe a bug in soot spark call graph construct?

Open ox1234 opened this issue 3 years ago • 1 comments

The following call: this.loggerConfig.log(loggerName, fqcn, location, marker, level, data, t);. this.loggerConfig is LoggerConfig type.When i build the call graph with spark, i found the call graph doesn't have LoggerConfig.log node. image The this.loggerConfig is assigned in this expression: image It seems this.loggerConfig's type is not recognized by soot.I want to know why the call graph is disconnected from here and how i can fix this? Here is my soot call graph configuration:

protected void configureCallgraph() {
        switch (config.getCallgraphAlgorithm()) {
            case AutomaticSelection:
            case SPARK:
                Options.v().setPhaseOption("cg.spark", "on");
                break;
            case GEOM:
                Options.v().setPhaseOption("cg.spark", "on");
                AbstractInfoflow.setGeomPtaSpecificOptions();
                break;
            case CHA:
                Options.v().setPhaseOption("cg.cha", "on");
                Options.v().setPhaseOption("cg.cha", "verbose:true");
                break;
            case RTA:
                Options.v().setPhaseOption("cg.spark", "on");
                Options.v().setPhaseOption("cg.spark", "rta:true");
                Options.v().setPhaseOption("cg.spark", "on-fly-cg:false");
                break;
            case VTA:
                Options.v().setPhaseOption("cg.spark", "on");
                Options.v().setPhaseOption("cg.spark", "vta:true");
                break;
            default:
                throw new RuntimeException("Invalid callgraph algorithm");
        }
        if (config.getEnableReflection())
            Options.v().setPhaseOption("cg", "types-for-invoke:true");
        configureCustomCallGraph();
    }

    protected void configureCustomCallGraph(){
        Options.v().setPhaseOption("cg", "library:signature-resolution");
        Options.v().setPhaseOption("cg", "trim-clinit:false");
        Options.v().setPhaseOption("cg.spark", "field-based:true");
        Options.v().setPhaseOption("cg.spark", "types-for-sites:true");
        Options.v().setPhaseOption("cg.spark", "empties-as-allocs:true");
        Options.v().setPhaseOption("cg.spark", "propagator:iter");
    }

I am analyzing log4j-api-2.14.1.jar and log4j-core-2.14.1.jar Hope for anyone's help!!!

ox1234 avatar Jan 04 '22 08:01 ox1234

Hello, is it resolved? I encountered the same issue.

xzy0311 avatar Jan 13 '24 16:01 xzy0311