-
-
Notifications
You must be signed in to change notification settings - Fork 714
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
Fix the bug java.lang.IllegalArgumentException: Opcode: IPUT_OBJECT_VOLATILE #2141
Changes from all commits
b7fe975
8d82016
86ca1fe
06fee56
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -218,7 +218,10 @@ protected void internalTransform(Body b, String phaseName, Map<String, String> o | |
if (l != m) { | ||
Integer defCount = localToDefCount.get(m); | ||
if (defCount == null || defCount == 0) { | ||
throw new RuntimeException("Variable " + m + " used without definition!"); | ||
if (Options.v().verbose()) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't just ignore errors. If we generate invalid code, we need to know that. Keep in mind that Soot can also write out DEX code again. If we have wrong code, the output will be invalid as well. These sanity checks are highly important. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK.I will close the PR. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I print the code of the error Method body: |
||
logger.debug("[" + b.getMethod().getName() + "] Skipping undefined variable: " + m); | ||
} | ||
continue; | ||
} else if (defCount == 1) { | ||
useBox.setValue(m); | ||
copyLineTags(useBox, def); | ||
|
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.
This isn't a proper fix. The copy constructor internally iterates over the list, which can trigger the same
ConcurrentModificationException
. If you have a problem with concurrent modification, you need to fix the root cause.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.
This problem occurs when calling soot to generate jimples from jar. The current random scenario is when processing the latest version of pixel9proxl /system/framework/services.jar. This problem causes the jimple to fail to generate.