wh1t3p1g / tabby

A CAT called tabby ( Code Analysis Tool )
https://www.yuque.com/wh1t3p1g/tp0c1t/lf12lg69ngh47akx
Apache License 2.0
1.27k stars 149 forks source link

soot.method.retrieveActiveBody 报错有没有什么好的解决方法 #70

Closed SuperXiaoxiong closed 9 months ago

SuperXiaoxiong commented 9 months ago

soot.method.retrieveActiveBody 报错有没有什么好的解决方法

wh1t3p1g commented 9 months ago

这个貌似有好几种错误,你说的是哪种

SuperXiaoxiong commented 9 months ago

集中体现在一些类当中,

要分具体类型么,还是直接忽略就好

java.lang.RuntimeException: Failed to convert <oracle.jdbc.proxy.ClassGenerator: void generate(org.objectweb.asm.ClassWriter)>
        at soot.asm.AsmMethodSource.getBody(AsmMethodSource.java:2249)
        at soot.SootMethod.retrieveActiveBody(SootMethod.java:447)
        at org.clyze.doop.soot.DoopAddons.lambda$retrieveAllSceneClassesBodies$0(DoopAddons.java:104)
        at org.clyze.doop.soot.DoopAddons$1.run(DoopAddons.java:121)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.RuntimeException: Trying to create interface invoke expression for non-interface type: org.objectweb.asm.MethodVisitor Use JVirtualInvokeExpr or JSpecialInvokeExpr instead!
        at soot.jimple.internal.JInterfaceInvokeExpr.<init>(JInterfaceInvokeExpr.java:47)
        at soot.jimple.Jimple.newInterfaceInvokeExpr(Jimple.java:491)
        at soot.asm.AsmMethodSource.convertMethodInsn(AsmMethodSource.java:1436)
        at soot.asm.AsmMethodSource.convert(AsmMethodSource.java:1965)
        at soot.asm.AsmMethodSource.getBody(AsmMethodSource.java:2247)
        ... 6 more
java.lang.RuntimeException: Failed to convert <oracle.jdbc.proxy.Utils: void cast(org.objectweb.asm.MethodVisitor,java.lang.Class,java.lang.Class)>
        at soot.asm.AsmMethodSource.getBody(AsmMethodSource.java:2249)
        at soot.SootMethod.retrieveActiveBody(SootMethod.java:447)
        at org.clyze.doop.soot.DoopAddons.lambda$retrieveAllSceneClassesBodies$0(DoopAddons.java:104)
        at org.clyze.doop.soot.DoopAddons$1.run(DoopAddons.java:121)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.RuntimeException: Trying to create interface invoke expression for non-interface type: org.objectweb.asm.MethodVisitor Use JVirtualInvokeExpr or JSpecialInvokeExpr instead!
        at soot.jimple.internal.JInterfaceInvokeExpr.<init>(JInterfaceInvokeExpr.java:47)
        at soot.jimple.Jimple.newInterfaceInvokeExpr(Jimple.java:491)
        at soot.asm.AsmMethodSource.convertMethodInsn(AsmMethodSource.java:1436)
        at soot.asm.AsmMethodSource.convert(AsmMethodSource.java:1965)
        at soot.asm.AsmMethodSource.getBody(AsmMethodSource.java:2247)
        ... 6 more
java.lang.RuntimeException: Failed to convert <oracle.jdbc.proxy.Utils: void autoBox(org.objectweb.asm.MethodVisitor,java.lang.Class)>
        at soot.asm.AsmMethodSource.getBody(AsmMethodSource.java:2249)
        at soot.SootMethod.retrieveActiveBody(SootMethod.java:447)
        at org.clyze.doop.soot.DoopAddons.lambda$retrieveAllSceneClassesBodies$0(DoopAddons.java:104)
        at org.clyze.doop.soot.DoopAddons$1.run(DoopAddons.java:121)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.RuntimeException: Trying to create interface invoke expression for non-interface type: org.objectweb.asm.MethodVisitor Use JVirtualInvokeExpr or JSpecialInvokeExpr instead!
        at soot.jimple.internal.JInterfaceInvokeExpr.<init>(JInterfaceInvokeExpr.java:47)
        at soot.jimple.Jimple.newInterfaceInvokeExpr(Jimple.java:491)
        at soot.asm.AsmMethodSource.convertMethodInsn(AsmMethodSource.java:1436)
        at soot.asm.AsmMethodSource.convert(AsmMethodSource.java:1965)
        at soot.asm.AsmMethodSource.getBody(AsmMethodSource.java:2247)
        ... 6 more
java.lang.RuntimeException: Failed to convert <oracle.jdbc.proxy.Utils: void autoUnbox(org.objectweb.asm.MethodVisitor,java.lang.Class)>
        at soot.asm.AsmMethodSource.getBody(AsmMethodSource.java:2249)
        at soot.SootMethod.retrieveActiveBody(SootMethod.java:447)
        at org.clyze.doop.soot.DoopAddons.lambda$retrieveAllSceneClassesBodies$0(DoopAddons.java:104)
        at org.clyze.doop.soot.DoopAddons$1.run(DoopAddons.java:121)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.RuntimeException: Trying to create interface invoke expression for non-interface type: org.objectweb.asm.MethodVisitor Use JVirtualInvokeExpr or JSpecialInvokeExpr instead!
        at soot.jimple.internal.JInterfaceInvokeExpr.<init>(JInterfaceInvokeExpr.java:47)
        at soot.jimple.Jimple.newInterfaceInvokeExpr(Jimple.java:491)
        at soot.asm.AsmMethodSource.convertMethodInsn(AsmMethodSource.java:1436)
        at soot.asm.AsmMethodSource.convert(AsmMethodSource.java:1965)
        at soot.asm.AsmMethodSource.getBody(AsmMethodSource.java:2247)
        ... 6 more
java.lang.RuntimeException: Failed to convert <oracle.jdbc.proxy.Utils: void loadClass(org.objectweb.asm.MethodVisitor,java.lang.Class)>
        at soot.asm.AsmMethodSource.getBody(AsmMethodSource.java:2249)
        at soot.SootMethod.retrieveActiveBody(SootMethod.java:447)
        at org.clyze.doop.soot.DoopAddons.lambda$retrieveAllSceneClassesBodies$0(DoopAddons.java:104)
        at org.clyze.doop.soot.DoopAddons$1.run(DoopAddons.java:121)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.RuntimeException: Trying to create interface invoke expression for non-interface type: org.objectweb.asm.MethodVisitor Use JVirtualInvokeExpr or JSpecialInvokeExpr instead!
        at soot.jimple.internal.JInterfaceInvokeExpr.<init>(JInterfaceInvokeExpr.java:47)
        at soot.jimple.Jimple.newInterfaceInvokeExpr(Jimple.java:491)
        at soot.asm.AsmMethodSource.convertMethodInsn(AsmMethodSource.java:1436)
        at soot.asm.AsmMethodSource.convert(AsmMethodSource.java:1965)
        at soot.asm.AsmMethodSource.getBody(AsmMethodSource.java:2247)
        ... 6 more
java.lang.RuntimeException: Failed to convert <oracle.jdbc.proxy.Utils: void loadConst(org.objectweb.asm.MethodVisitor,int)>
        at soot.asm.AsmMethodSource.getBody(AsmMethodSource.java:2249)
        at soot.SootMethod.retrieveActiveBody(SootMethod.java:447)
        at org.clyze.doop.soot.DoopAddons.lambda$retrieveAllSceneClassesBodies$0(DoopAddons.java:104)
        at org.clyze.doop.soot.DoopAddons$1.run(DoopAddons.java:121)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.RuntimeException: Trying to create interface invoke expression for non-interface type: org.objectweb.asm.MethodVisitor Use JVirtualInvokeExpr or JSpecialInvokeExpr instead!
        at soot.jimple.internal.JInterfaceInvokeExpr.<init>(JInterfaceInvokeExpr.java:47)
        at soot.jimple.Jimple.newInterfaceInvokeExpr(Jimple.java:491)
        at soot.asm.AsmMethodSource.convertMethodInsn(AsmMethodSource.java:1436)
        at soot.asm.AsmMethodSource.convert(AsmMethodSource.java:1965)
        at soot.asm.AsmMethodSource.getBody(AsmMethodSource.java:2247)
        ... 6 more
java.lang.RuntimeException: Failed to convert <oracle.jdbc.proxy.MethodGenerator: void generate(org.objectweb.asm.ClassWriter)>
        at soot.asm.AsmMethodSource.getBody(AsmMethodSource.java:2249)
        at soot.SootMethod.retrieveActiveBody(SootMethod.java:447)
        at org.clyze.doop.soot.DoopAddons.lambda$retrieveAllSceneClassesBodies$0(DoopAddons.java:104)
        at org.clyze.doop.soot.DoopAddons$1.run(DoopAddons.java:121)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.RuntimeException: Trying to create interface invoke expression for non-interface type: org.objectweb.asm.MethodVisitor Use JVirtualInvokeExpr or JSpecialInvokeExpr instead!
        at soot.jimple.internal.JInterfaceInvokeExpr.<init>(JInterfaceInvokeExpr.java:47)
        at soot.jimple.Jimple.newInterfaceInvokeExpr(Jimple.java:491)
        at soot.asm.AsmMethodSource.convertMethodInsn(AsmMethodSource.java:1436)
        at soot.asm.AsmMethodSource.convert(AsmMethodSource.java:1965)
        at soot.asm.AsmMethodSource.getBody(AsmMethodSource.java:2247)
        ... 6 more
java.lang.RuntimeException: Failed to convert <oracle.jdbc.proxy.MethodGenerator: void loadDelegateParams(org.objectweb.asm.MethodVisitor)>
        at soot.asm.AsmMethodSource.getBody(AsmMethodSource.java:2249)
        at soot.SootMethod.retrieveActiveBody(SootMethod.java:447)
        at org.clyze.doop.soot.DoopAddons.lambda$retrieveAllSceneClassesBodies$0(DoopAddons.java:104)
        at org.clyze.doop.soot.DoopAddons$1.run(DoopAddons.java:121)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.RuntimeException: Trying to create interface invoke expression for non-interface type: org.objectweb.asm.MethodVisitor Use JVirtualInvokeExpr or JSpecialInvokeExpr instead!
        at soot.jimple.internal.JInterfaceInvokeExpr.<init>(JInterfaceInvokeExpr.java:47)
        at soot.jimple.Jimple.newInterfaceInvokeExpr(Jimple.java:491)
        at soot.asm.AsmMethodSource.convertMethodInsn(AsmMethodSource.java:1436)
        at soot.asm.AsmMethodSource.convert(AsmMethodSource.java:1965)
        at soot.asm.AsmMethodSource.getBody(AsmMethodSource.java:2247)
        ... 6 more
java.lang.RuntimeException: Failed to convert <oracle.jdbc.proxy.MethodGenerator: void initializeMethodObject(org.objectweb.asm.MethodVisitor)>
        at soot.asm.AsmMethodSource.getBody(AsmMethodSource.java:2249)
        at soot.SootMethod.retrieveActiveBody(SootMethod.java:447)
        at org.clyze.doop.soot.DoopAddons.lambda$retrieveAllSceneClassesBodies$0(DoopAddons.java:104)
        at org.clyze.doop.soot.DoopAddons$1.run(DoopAddons.java:121)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.RuntimeException: Trying to create interface invoke expression for non-interface type: org.objectweb.asm.MethodVisitor Use JVirtualInvokeExpr or JSpecialInvokeExpr instead!
        at soot.jimple.internal.JInterfaceInvokeExpr.<init>(JInterfaceInvokeExpr.java:47)
        at soot.jimple.Jimple.newInterfaceInvokeExpr(Jimple.java:491)
        at soot.asm.AsmMethodSource.convertMethodInsn(AsmMethodSource.java:1436)
        at soot.asm.AsmMethodSource.convert(AsmMethodSource.java:1965)
        at soot.asm.AsmMethodSource.getBody(AsmMethodSource.java:2247)
        ... 6 more
wh1t3p1g commented 9 months ago

这个报错soot看起来已经修复了 好久没遇到这个问题了。现在比较多的是HIERARCHY载入的错误,这个可以通过一些trick解决掉

SuperXiaoxiong commented 9 months ago

我看 tabby 做了异常处理,解决了这个问题