Hallo Evgeny, 

sharing my analysis tools here: 

https://github.com/marchof/jacoco-dev-bytecode 

Cheers,
-marc 

On 2017-09-20 00:37, Evgeny Mandrikov wrote:

> I came up to the same change. Nice that our thinking matches ;) And with this 
> change original class from this thread after instrumentation passes 
> verification! 
> 
> However still suspicious that with or without modification our tests do not 
> touch else-branch that is "push(t1)", especially that we observe bug near 
> this place. 
> 
> Maybe we can simply report this to ASM just citing JVMS. But I'm still 
> wondering: 
> 
> * is it possible to construct case that makes sense and triggers this 
> problem? or in other words - does it mean that part of code from original 
> class doesn't make sense? ;)
> * why problem is observed specifically after compute-frames?
> 
> On Tuesday, September 19, 2017 at 8:41:24 PM UTC+2, Marc R. Hoffmann wrote: 
> 
> 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: 
> Sorry, forgot to attach file, here it is.
> 
> On Tuesday, September 19, 2017 at 2:53:28 PM UTC+2, Evgeny Mandrikov wrote: 
> 
> Hi Marc, 
> 
> FYI: 
> 
> I tried to instrument class from this thread by JaCoCo 0.6.4, where we had 
> FrameTracker and got ClassCastException in it at line 
> https://github.com/jacoco/jacoco/blob/v0.6.4/org.jacoco.core/src/org/jacoco/core/internal/instr/FrameTracker.java#L253
>  [1] ("java.lang.Integer cannot be cast to java.lang.String"), i.e. during 
> processing of AALOAD instruction. 
> 
> We replaced our FrameTracker by ASM's AnalyzerAdapter that has another 
> implementation for AALOAD - 
> https://gitlab.ow2.org/asm/asm/blob/ASM_5_2/src/org/objectweb/asm/commons/AnalyzerAdapter.java#L665
>  [2] 
> 
> None of our existing tests touches else-branch of this implementation, while 
> it is touched by class from this thread. So I tried to build smaller example 
> that will also touch this line - you'll find it in attachment: 
> 
> * as said above - target class is not a reduction of class from this thread
> * and actually code of target class has no sense
> * however target class doesn't pass our FramesTest
> * and test demonstrates pretty similar VerifyError ("Type 'java/lang/Object' 
> is not assignable to null") when executed with JDK 8u131
> * to trigger VerifyError, target class must first be read and written back by 
> ASM ClassWriter.COMPUTE_FRAMES - this reflects statement that class from this 
> thread is a result of instrumentation by another tool, and this is what 
> happens in FramesTest
> 
> Hope this simplifies hunting of root cause and together we'll finally find it 
> (hopefully not in our code :D) 
> 
> -- 
> 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 [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jacoco/34c8ae23-d518-43c7-8c87-951fe6b550a9%40googlegroups.com
>  [3].
> For more options, visit https://groups.google.com/d/optout [4].

  -- 
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jacoco/b0088827-5115-4d12-b7fa-1b13eccfcaed%40googlegroups.com
[5].
For more options, visit https://groups.google.com/d/optout. 

  

Links:
------
[1]
https://github.com/jacoco/jacoco/blob/v0.6.4/org.jacoco.core/src/org/jacoco/core/internal/instr/FrameTracker.java#L253
[2]
https://gitlab.ow2.org/asm/asm/blob/ASM_5_2/src/org/objectweb/asm/commons/AnalyzerAdapter.java#L665
[3]
https://groups.google.com/d/msgid/jacoco/34c8ae23-d518-43c7-8c87-951fe6b550a9%40googlegroups.com?utm_medium=email&utm_source=footer
[4] https://groups.google.com/d/optout
[5]
https://groups.google.com/d/msgid/jacoco/b0088827-5115-4d12-b7fa-1b13eccfcaed%40googlegroups.com?utm_medium=email&utm_source=footer

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/d921ce4e9a693df5dc846b746a7ff31e%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to