-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to 'not' include java libraries methods #14
Comments
Hello. It looks like you have set the option If you want to ignore method bodies, you need to provide some sort of dummy methods in the ProgramRepresentation. For example, you might want to replace all methods without a body to having a stub CFG that is equivalent to "return null" or something like that. Otherwise, the data-flow analysis does not know what to do when analyzing calls to phantom methods. The ideal way to do this is to subclass the There is an implementation of initContextForPhantomMethod which simply copies the IN to the OUT for a phantom method. I don't think this method is ever called, but you can possibly use it instead of the default |
I just pushed a commit that does the above. If a soot method does not have a body, then when it is called the context is initialized such that the OUT of the method is equal to its IN. Phantom methods are essentially "jumped over" as if they never existed. Note that this is not sound in general. |
hello, I made a little change to the
then I set the option
but ,if i remove the option
|
Right. I guess CopyConstantAnalysis#callEntryFlowFunction will have to handle the case where vasco/src/main/java/vasco/soot/examples/CopyConstantAnalysis.java Lines 108 to 126 in 5598bcf
Feel free to send a PR if you get around to fixing this. |
Hello,
I am setting the below options in my analysis to exclude analyzing java libraries from my analysis:
Options.v().set_app(true);
Options.v().set_allow_phantom_refs(true);
List l = new LinkedList();
l.add("java.*");
Options.v().set_exclude(l);
Options.v().set_no_bodies_for_excluded(true);
But, the following exception is coming:
specialinvoke $r0.<java.util.LinkedList: void ()>()
The text was updated successfully, but these errors were encountered: