Community
Participate
Working Groups
Created attachment 233915 [details] Proposed Patch
Patch looks good.
Committed via http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=baa4a9e4edb300fb0af04795d1bd24822786128a
Running org.eclipse.jdt.core.tests.compiler.regression.TestAll at compliance 1.8 with b100 on Linux I see 80 failures, all like this: java.lang.IncompatibleClassChangeError at java.lang.invoke.MethodHandleNatives.linkMethodHandleConstant(MethodHandleNatives.java:383) at X.main(X.java:21) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:491) at The last line is indeed truncated. Some failing tests in NegativeLambdaExpressionsTest are test401610f, test401610f, test049, test401610, etc. Is anybody else seeing this? Should I assume my jdk download is corrupt (I did check the md5 though). Switching back to b92 makes the failures disappear.
Update: I just downloaded b99, and it shows the same failures, so it seems to be s.t. real.
(In reply to comment #5) > Update: > I just downloaded b99, and it shows the same failures, so it seems to be > s.t. real. I was able to reproduce the issue in linux although the same (all) tests pass in windows. On further investigation, it is found to be an issue with b100 JRE itself. Taking a sample failing test case X.java: $ cat X.java interface I { abstract void doit(); } public class X { public static void main(String[] args) { int var = 2; I x2 = () -> { System.out.println("Hello World"); }; x2.doit(); var=2; } } Decompiled class files' relevant portions are shown below: Eclipse JDT Core compiled: BootstrapMethods: 0: #39 invokestatic java/lang/invoke/LambdaMetafactory.metaFactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; Method arguments: #41 invokeinterface I.doit:()V #44 invokestatic X.lambda$0:()V #45 ()V b100 command line compiled BootstrapMethods: 0: #20 invokestatic java/lang/invoke/LambdaMetafactory.metaFactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; Method arguments: #21 invokeinterface I.doit:()V #22 invokestatic X.lambda$0:()V #23 ()V In addition, the class files compiled by both b100 as well Eclipse JDT from Windows, when ran on linux, gave the same error. One immediate workaround for this issue is to disable these failing tests using os specific switch until this issue is addressed. Stephan: I can provide a patch to this end if this workaround helps for the time being.
(In reply to comment #6) > Stephan: I can provide a patch to this end if this workaround helps for the > time being. Thanks for the offer. I'm still using b92 which works fine for my so far. Has the JRE problem been reported to them?
(In reply to comment #7) > Has the JRE problem been reported to them? No.
(In reply to comment #8) > (In reply to comment #7) > > > Has the JRE problem been reported to them? > No. Yes, and so we are ready to close this.
Is there some kind of bug reference we can track for when this is fixed? My users are getting really frustrated with this problem coming out.
Manoj, please provide any details you have on this. In the meantime, we heard from Tom on jdt-core-dev about a possible meta factory method signature change seen at 8b105. http://dev.eclipse.org/mhonarc/lists/jdt-core-dev/msg02324.html What Manoj observed was that 8b100 on windows would run a program successfully while the same class files presented to 8b100 on Linux would fail. I had not heard of any recent changes in meta factory API through the EG forums. We will test shortly on 8b105 and see what needs to be done - (we have a long weekend in India, so it could be Tuesday next at the earliest.)
(In reply to Andrew Clement from comment #10) > Is there some kind of bug reference we can track for when this is fixed? My > users are getting really frustrated with this problem coming out. Have not heard from them on this at all. Neither does the search provide any info. Anyway, with the latest we have access to, ie b104, we do get the same error with windows as well (Linux continues to fail on b104). Bug 416885 will track further updates.