FYI, here are the decompiled versions of the original and instrumented class files:
https://gist.github.com/marchof/c5ba614ea03015f304517bbb3d72d7c7
Method in question is quite complex, needs further analysis.
Regards,
-marc
--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/3b48a707-3c99-4a2e-a798-48f28e1fb6b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
Thanks Evgeny for this minimal Example! AALOAD is a perfect hint.
I added it to our FramesTest and indeed it fails. I'll investigate.
Cheers,
-marc
--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/34c8ae23-d518-43c7-8c87-951fe6b550a9%40googlegroups.com.
Hi Evgeny,
I think the problem ist with AnalyzerAdapter: When AALOAD is invoked on a variable with type null the resulting frame type is null, not "java/lang/Object". See Chapter "4.10.1.9 Type Checking Instructions" JVMS, section AALOAD:
The component type of an array of X is X. We define the component type of null to be null.
arrayComponentType(arrayOf(X), X).
arrayComponentType(null, null).
I try to create a standalone reproducer for ASM.
Cheers,
-marc
On 2017-09-19 14:56, Evgeny Mandrikov wrote:
--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/34c8ae23-d518-43c7-8c87-951fe6b550a9%40googlegroups.com.
Hi Evgeny,
with this change to AnalyzerAdapter the test becomes green again.
Cheers,
-marc
case Opcodes.AALOAD:
pop(1);
t1 = pop();
if (t1 instanceof String) {
pushDesc(((String) t1).substring(1));
} else if (t1 == Opcodes.NULL) {
push(Opcodes.NULL);
} else {
push("java/lang/Object");
}
break;
On 2017-09-19 14:56, Evgeny Mandrikov wrote:
--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/34c8ae23-d518-43c7-8c87-951fe6b550a9%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+unsubscribe@googlegroups.com.
Hi Evgeny,
some more insights. Given this snippet:
Object[] array = null;
Object element = array[0];
Both compilers JDK and ECJ emit the following stack frame afterwards (if enforced by a merging branch):
[Ljava/lang/Object; java/lang/Object
With this frame AnalyzerAdapter works ok. Also the class passes the JVM verifier.
When I do a a frame recalculation with ASM (ClassWriter.COMPUTE_FRAMES) I get the following frame:
Null Null
Which is also ok for the JVM verifier but seems to trigger AnalyzerAdapter to calculate wrong frames in certain cases.
This explains why the problem is only triggered after frames have been recomputed with ASM.
Cheers,
-marc
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/b0088827-5115-4d12-b7fa-1b13eccfcaed%40googlegroups.com.
Cheers,
-marc
On 2017-09-20 00:37, Evgeny Mandrikov wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/b0088827-5115-4d12-b7fa-1b13eccfcaed%40googlegroups.com.
Hi Evgeny,
I've drafted a Bug report for ASM: https://gist.github.com/marchof/8d2047c34b512acfaac09928d4b59d35
What do you think?
Regards,
-marc