Skip to content

Commit ac179a1

Browse files
committed
Test case and fix for logging multiple array params to a non-det method
1 parent 3657703 commit ac179a1

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

Code/ChroniclerJ/src/main/java/edu/columbia/cs/psl/chroniclerj/visitor/NonDeterministicLoggingClassVisitor.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,6 @@ else if (mi.getOpcode() != Opcodes.INVOKESTATIC) {
205205

206206
}
207207
caa.visitVarInsn(args[i].getOpcode(ILOAD), j);
208-
j+=args[i].getSize();
209-
// - (mi.getOpcode() == Opcodes.INVOKESTATIC ? 0 : 1)
210208
caa.logValueAtTopOfStackToArray(MethodCall.getLogClassName(args[i]),
211209
"aLog", "[Ljava/lang/Object;", args[i], true, mi.owner + "."
212210
+ mi.name + "->_" + i + "\t" + args[i].getDescriptor()
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package edu.columbia.cs.psl.test.chroniclerj;
2+
3+
import javax.management.MBeanServerFactory;
4+
5+
import org.junit.Test;
6+
7+
public class CreateMBeanITCase {
8+
@Test
9+
public void testCallCreateMBeanDoesntCrashInstrumentation() throws Exception {
10+
if(1!=1)
11+
MBeanServerFactory.createMBeanServer().createMBean(null, null, null, null, null);
12+
}
13+
}

0 commit comments

Comments
 (0)