-
-
Notifications
You must be signed in to change notification settings - Fork 716
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
added reset methods to Scene and SourceLocator to load multiple sources into one Scene and Concrete Native Methods #2015
Conversation
src/main/java/soot/SootMethod.java
Outdated
@@ -230,7 +230,7 @@ public boolean isPhantom() { | |||
* Returns true if this method is not phantom, abstract or native, i.e. this method can have a body. | |||
*/ | |||
public boolean isConcrete() { | |||
return !isPhantom() && !isAbstract() && !isNative(); | |||
return !isPhantom() && !isAbstract(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should only use this semantics if the native code module is enabled. Maybe we can add a flag to the Options to enable or disable native code and check this flag here. Keep in mind that the options are generated from XML files via XSLT, so don't modify the Java file directly.
@MarcMil What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like a good idea, this implementation right here would brick things.
I wonder whether it would be better to do something like hasActiveBody() || ms != null
, so if it is possible to retrieve a body at all, which is what every caller seems to actually want to know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be an option, but it would also force us to refactor the Jimple Native reader to make it a proper MethodSource
.
@lukaswd The code style check failed. Please have a look and fix the code accordingly. |
These two methods allow for subsequent calls of
loadNecessaryClasses()
.With that it is possible, if the two methods are called before the next
loadNecessaryClasses()
method call, to load multiple sources into the same Soot Scene.Example code to load two programs into the same Soot Scene: