Col-E/SimAnalyzer
View on GitHubInstruction tracking does not include void calls on objects
Open
#3 opened on Jul 30, 2020
bughelp wanted
Repository metrics
- Stars
- (48 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
Given the following example:
NEW Type
DUP
INVOKESPECIAL Type.<init>()V
INVOKEVOID Type.enableThing()V
ASTORE t
ALOAD t
ARETURN
The tracked instructions will not include the constructor or void call.
Type.<init>()VType.enableThing()V
This is not a clear edge-case fix since ASM tosses values of invoke calls that return void. This is done in Frame#executeInvokeInsn(...)
private void executeInvokeInsn(AbstractInsnNode insn, final String desc, final Interpreter<V> interpreter) {
// ... snip
if (Type.getReturnType(methodDescriptor) == Type.VOID_TYPE) {
interpreter.naryOperation(insn, valueList);
} else {
push(interpreter.naryOperation(insn, valueList));
}
}
There is a test case that asserts the current behavior: TestInstructionTracking