-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Failure after instrumentation of code which has stackmap frames and array of more than 7 dimensions #839
Comments
Hi @quiquinSP, first of all thank you for the reproducer! 👍 ❤️ However I doubt about correctness of your statement
because following reduced
demonstrates exactly the same problem even with Java 8:
but the problem goes away when class has no stackmap frames, i.e. when compiled into Java 5 bytecode:
and seems to be related to the bug in ASM library - https://gitlab.ow2.org/asm/asm/issues/317866 As a temporary workaround you can exclude such classes from JaCoCo instrumentation. P.S. and please excuse me for pedantism, however
JaCoCo does not perform instantiation - it performs instrumentation; instantiation, initialization and etc are performed by JVM as usual. |
Hi @Godin, thank you very much for your prompt reaction.
Yes, you are right the problem was not related with Java version, with Java 8 I was using a different version of JaCoCo 0.7.9 that uses a different asm version (5.2).
Yes, I am going to exclude this particular test from the analysis. |
For the record - the same problem with arrays of non-primitive with more than 7 dimensions:
however exception looks differently
|
I am in the process of migrating a SW from Java 8 to Java 11. We are using JaCoCo for code coverage and I have found a problem when running the unit tests with JaCoCo tool (using ant).
JaCoCo fails when it instantiates a class that contains a primitive array with more than 8 dimensions. Please do not ask about the motivation of having an 8 dimensional array .... legacy code I have to maintain.
I have reduced the code to the min that reproduces the problem.
Steps to reproduce
JaCoCo version: tested with 0.8.2 and 0.8.3
Operating system: MacOS HighSierra 10.13.6 and CentOS Linux release 7.5.1804
Tool integration: Ant 1.10.5 and Eclipse EclEmma 3.1.1.201809121651
Java Versions: OpenJDK 11.0.1 and OpenJDK 11.0.2
Use the following piece of code
Expected behaviour
JaCoCo is able to run the tests with no failure.
Actual behaviour
Tests fail with the following stack trace
and running the testBooleanArray .... the same but with different ClassNotFoundException:
The text was updated successfully, but these errors were encountered: