- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用WALA进行静态分析,但遇到了一些问题。当我构建调用图时,某些 jar 存在以下问题:
Exception in thread "main" java.lang.IllegalStateException: Could not create a entrypoint callsites:
[Moderate] class com.ibm.wala.ipa.cha.ClassHierarchy$ClassExclusion : No superclass found for Superclass name Lorg/eclipse/swt/dnd/ByteArrayTransfer
[Moderate] class com.ibm.wala.ipa.cha.ClassHierarchy$ClassExclusion : No superclass found for Superclass name Lorg/eclipse/swt/widgets/Canvas
[SEVERE] class com.ibm.wala.classLoader.BytecodeClass$ClassNotFoundWarning : Lorg/eclipse/swt/dnd/DragSourceListener
[SEVERE] class com.ibm.wala.classLoader.BytecodeClass$ClassNotFoundWarning : Lorg/eclipse/swt/dnd/DropTargetListener
com.ibm.wala.ipa.callgraph.propagation.PropagationCallGraphBuilder.makeCallGraph(PropagationCallGraphBuilder.java:263)
wala 似乎无法获取 eclipse.swt 包的 .class 文件,因此我无法构建调用图来进行切片。您遇到过这样的问题吗?这个问题兄弟我很久了。问题Jar是这样的:http://mirror.bit.edu.cn/apache/commons/io/binaries/
WALA版本是1.4.3。我的代码是:
AnalysisScope scope = AnalysisScopeReader.makeJavaBinaryAnalysisScope(jarPath, exFile);
ClassHierarchy cha = ClassHierarchyFactory.make(scope);
Iterable entrypoints = Util.makeMainEntrypoints(scope, cha);
AnalysisOptions options = new AnalysisOptions(scope, entrypoints);// the problem line
options.setReflectionOptions(ReflectionOptions.NONE);
那么,我该如何处理这个问题。非常非常感谢。
最佳答案
我想知道你的jarPath包含什么代码。因为我发现您的入口点是通过 makeMainEntrypoints
方法创建的,所以该方法要求您正在分析的二进制文件的源代码必须包含 main 方法。
如果它不包含main方法,您可以使用AllApplicationEntrypoints
类来构建入口点,如下所示:
Iterable<Entrypoint> entrypoints = new AllApplicationEntrypoints(scope, cha);
关于java - WALA :“Could not create a entrypoint callsites:” 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56003762/
我是一名优秀的程序员,十分优秀!