Closed FXTi closed 1 year ago
Try to add --allow-phantom
to suppress the resolving error because of frontend according to wiki:
String files = Stream.of(new File("target").listFiles())
.filter(file -> !file.isDirectory())
.map(File::toString)
- .collect(Collectors.joining(":"));
+ .collect(Collectors.joining(File.pathSeparator));
Main.main(new String[]{ "-cp", files,
+ "--allow-phantom", // or "-ap"
"-m", "org.apache.hadoop.hbase.mapreduce.Driver",
"-java", "8",
"-a", "pta"
});
Thanks! It solve my problem.
After I dug into this I found it was indeed a frontend-related issue and although "--allow-phantom"
can suppress the error, there are some potential pitfalls.
For example, in the following case, the frontend will not execute valid reference analysis on U.class
, then the class U
will not be included in the World of analysis (then Soot error occurs).
public class Test {
public static void main(String[] args) throws Exception {
Class<U> klass = U.class; // U is another empty class in the same directory with Test
java.lang.reflect.Method[] declaredMethods = klass.getDeclaredMethods(); // just for using U
}
}
"--allow-phantom"
can suppress the error, but notes that some classes will be empty/ignored, that is, in the above case, U
and its related process will be ignored. (There are so many U.class
in the main method of org.apache.hadoop.hbase.mapreduce.Driver)
If you are very concerned about U
‘s handling, then you can manually add U
via --input-classes
according to wiki.
It is an issue about Soot frontend, we are working on it.
After I dug into this I found it was indeed a frontend-related issue and although
"--allow-phantom"
can suppress the error, there are some potential pitfalls.For example, in the following case, the frontend will not execute valid reference analysis on
U.class
, then the classU
will not be included in the World of analysis (then Soot error occurs).public class Test { public static void main(String[] args) throws Exception { Class<U> klass = U.class; // U is another empty class in the same directory with Test java.lang.reflect.Method[] declaredMethods = klass.getDeclaredMethods(); // just for using U } }
"--allow-phantom"
can suppress the error, but notes that some classes will be empty/ignored, that is, in the above case,U
and its related process will be ignored. (There are so manyU.class
in the main method of org.apache.hadoop.hbase.mapreduce.Driver)If you are very concerned about
U
‘s handling, then you can manually addU
via--input-classes
according to wiki.It is an issue about Soot frontend, we are working on it.
I'm curious about the progress of new frontend. Any plan? Maybe you can open a https://github.com/pascal-lab/Tai-e/projects and give out an outline of new frontend. Community contribution can boost the progress. : )
Describe the bug
I tried to do pointer analysis on MapReduce, and get exception:
Tai-e arguments
Compressed target folder: https://raw.githubusercontent.com/FXTi/codeql-uboot/main/target.tar.gz
Runtime environment infomation
OS: ArchLinux IDE: IDEA version of Tai-e: 0.0.3