Closed ReedOei closed 1 year ago
@ReedOei Thanks for the report. I've just reproduced this locally. At first glance it looks like an issue in the ASM library on which pitest depends, but a bit more digging will be required.
I contacted the ASM team - this is in fact due to a bug in the java 8 compiler.
It is fixed in Java 8u172 (I've not confirmed this) and Java 9 (this I have confirmed - the bug does not manifest when compiled with java 9).
The ASM team position is that they will not support invalid bytecode generated by compiler bugs (which is reasonable).
It is possible to add a workaround for this into pitest so it ignores the invalid bytecode, or to have it fail with an improved error message. I'm not certain if it is worth the effort however as the 172 release begin to spread and replace 171 over the coming months.
@hcoles Thanks for looking into this!
I'll try using update 172 to see if that fixes it. Unfortunately I can't use Java 9 for this project, but it's good to know that it shouldn't be a problem once I am able to upgrade.
Can confirm that Java 8 update 172 fixes the problem for me. Thanks again!
Reproduce steps:
I am using Java 8 on Ubuntu 16.04 LTS:
Here is the full output from Maven: