Re: [kaffe] ecj-compiled kaffe fails in regression tests
Hi Ito, Ito Kazumitsu wrote: From: Ito Kazumitsu [EMAIL PROTECTED] Date: Fri, 09 Dec 2005 13:31:58 +0900 (JST) So the question is whether the assumption that returned test array is consistently sorted is valid or not. If the assumption is valid, then ecj may be wrong. Otherwise we will have to modify the test programs so that it can check the result without depending on the order of array elements. Sun's API document of getDeclaredClasses says nothing about the order of elements in the returned array. So I do not tink it is a good thing to write a program which assumes some special order of elements of the array. So I think Kaffe's TestSerial*.java should be modified. Many thanks for exploring the reason of the bug. :) I am modifying the tests to sort the classes before running the test. However while comparing kaffe's output to sun's jdk I got some annoying differences in the way some exception are thrown. So these tests will remain as broken while someone fixes it (I'll try to do it...) Regards, Guilhem. ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
Re: [kaffe] ecj-compiled kaffe fails in regression tests
Hi Ito, Ito Kazumitsu wrote: Using the following poor man's ecj, $ cat bin/ecj #!/bin/sh exec /usr/local/kaffe/bin/kaffe \ -classpath $HOME/javalib/org.eclipse.jdt.core_3.1.1.jar \ org.eclipse.jdt.internal.compiler.batch.Main \ $@ I could make kaffe from kaffe-snapshot-20051206.tar.gz from http://people.debian.org/~avdyk/kaffe/snapshot/. After manually editing some script files, I managed to run make check, but the results were Would you mind to post the patch for your editing of these scripts? This is the last remaining problem before we can switching the debian kaffe package to ecj - currently we cannot run the regression checks. Regards, Wolfgang ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
Re: [kaffe] ecj-compiled kaffe fails in regression tests
Hi Wolfgang, I'll check in a patch for that tonight... I have also noticed that ecj was causing some troubles to kaffe and I'll remedy to them a bit later. Regards, Guilhem. Wolfgang Baer wrote: Hi Ito, Ito Kazumitsu wrote: Using the following poor man's ecj, $ cat bin/ecj #!/bin/sh exec /usr/local/kaffe/bin/kaffe \ -classpath $HOME/javalib/org.eclipse.jdt.core_3.1.1.jar \ org.eclipse.jdt.internal.compiler.batch.Main \ $@ I could make kaffe from kaffe-snapshot-20051206.tar.gz from http://people.debian.org/~avdyk/kaffe/snapshot/. After manually editing some script files, I managed to run make check, but the results were Would you mind to post the patch for your editing of these scripts? This is the last remaining problem before we can switching the debian kaffe package to ecj - currently we cannot run the regression checks. Regards, Wolfgang ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
Re: [kaffe] ecj-compiled kaffe fails in regression tests
From: Ito Kazumitsu [EMAIL PROTECTED] Date: Thu, 08 Dec 2005 11:26:03 +0900 (JST) 4 of 148 tests failed Please report to kaffe@kaffe.org Failed were FAIL: TestSerialVersions.java FAIL: TestSerialPersistent.java FAIL: TestSerialFields.java FAIL: ClassGC.java I ran these tests by compiling with various compilers on various VMs. The resuls are attached below. Seeing the results, I have had an impression that (1) TestSerial* tests have something specific to Kaffe because they never produce expected results when run on Sun's JDK. (2) Ecj may have some bug which causes unexpected results of TestSerial* tests. As Kiyo points, the bug may be similar to one that seems to have existed in old Jikes. (3) Kaffe VM may have something wrong which causes the failure of ClassGC test because Sun's JDK works well. Jikes seems to produce some bytecode which escapes from the proplem. My test results follow. OK: Produces the expected output. NG: Does not Produces the expected output. VMs: kaffe_jikes: kaffe VM 1.1.6+cvs ChangeLog head : 2005-11-04 Guilhem Lavaux [EMAIL PROTECTED] glibj.zip compiled with Jikes. kaffe_ecj: kaffe VM 1.1.6+cvs ChangeLog head : 2005-12-05 Guilhem Lavaux [EMAIL PROTECTED] glibj.zip compiled with ecj. Sun's JDK: java full version 1.5.0_06-b05 Compilers: jikes: Jikes Compiler - Version 1.22 Bootclasspath is glibj.zip of kaffe_jikes. jikes_ecj: Jikes Compiler - Version 1.22 Bootclasspath is glibj.zip of kaffe_ecj. ecj: org.eclipse.jdt.core_3.1.1.jar Bootclasspath is glibj.zip of kaffe_ecj. ecj-jikes: org.eclipse.jdt.core_3.1.1.jar Bootclasspath is glibj.zip of kaffe_jikes. gcj: gcj (GCC) 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125) sun: Sun's javac 1.5.0_06 (-source 1.4 -target 1.4) Compiler\VM kaffe_jikeskaffe_ecj Sun's JDK Test=TestSerialVersions jikes OK OKNG jikes_ecj OK OKNG ecjNG NGNG ecj_jikes NG NGNG gcjOK OKNG sunOK OKNG Test=TestSerialPersistent jikes OK OKNG jikes_ecj OK OKNG ecjNG NGNG ecj_jikes NG NGNG gcjOK OKNG sunNG NGNG Test=TestSerialFields jikes OK OKNG jikes_ecj OK OKNG ecjNG NGNG ecj_jikes NG NGOK gcjOK OKOK sunOK OKNG Test=ClassGC jikes OK OKOK jikes_ecj OK OKOK ecjNG NGOK ecj_jikes NG NGOK gcjNG NGOK sunNG NGOK ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
Re: [kaffe] ecj-compiled kaffe fails in regression tests
Hi Wolfgang, Would you mind to post the patch for your editing of these scripts? This is the last remaining problem before we can switching the debian kaffe package to ecj - currently we cannot run the regression checks. I hope Guilhem's fix will work. My manual editing was a dirty work in haste of getting the results. ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
Re: [kaffe] ecj-compiled kaffe fails in regression tests
From: Kiyo Inaba [EMAIL PROTECTED] Date: Thu, 8 Dec 2005 13:54:21 +0900 (JST) Using the following poor man's ecj, $ cat bin/ecj #!/bin/sh exec /usr/local/kaffe/bin/kaffe \ -classpath $HOME/javalib/org.eclipse.jdt.core_3.1.1.jar \ org.eclipse.jdt.internal.compiler.batch.Main \ $@ That's a good news! Could you please add something in 'FAQ.classlibrary- compile' for where we can get the jar file and this script? OK, how about this? --- FAQ/FAQ.classlibrary-compile.orig Wed Sep 21 15:02:00 2005 +++ FAQ/FAQ.classlibrary-compileFri Dec 9 10:55:09 2005 @@ -102,13 +102,34 @@ http://www.eclipse.org +If you cannot find ecj in this project site, just download Eclipse SDK +(eclipse-SDK-3.1.1 at the time of this writing), and read the document +Compiling Java code. Then you will find that the following shell script +will work as ecj. + +#!/bin/sh +exec path_to_a_working_Java_VM \ + -classpath path_to_org.eclipse.jdt.core.jar \ + org.eclipse.jdt.internal.compiler.batch.Main \ + $@ + +By the way, there is a distribution of ecj itself in the debian +repository (ecj-bootstrap). + In order to compile kaffe's class library, you need to set JAVAC_FLAGS to -source 1.4 -bootclasspath /full/path/to/builddir/libraries/javalib/lib/, with /full/path/to/builddir replaced by the full path to the directory where you are building the Kaffe source code. +Now ./configure accepts an option to use ecj: + + --with-ecj=ECJ Define to use ECJ as the java compiler instead of + jikes + +and you do not have to care about JAVAC_FLAGS. + It works with ecj 0.548, pre-3.1.0 milestone-6, and should work with later -versions as well. +versions as well. The wrapping shell script of ecj shown above also works. * kjc ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
Re: [kaffe] ecj-compiled kaffe fails in regression tests
On 12/8/05, Ito Kazumitsu [EMAIL PROTECTED] wrote: I hope Guilhem's fix will work. it does, but the 3 serial tests still fail :( pietro. ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
Re: [kaffe] ecj-compiled kaffe fails in regression tests
From: Ito Kazumitsu [EMAIL PROTECTED] Date: Fri, 09 Dec 2005 09:41:24 +0900 (JST) My test results follow. Sorry, I made mistakes while manually editing the test results. This time I used join to summarize the results: OK: Produces the expected output. NG: Does not Produces the expected output. VMs: kaffe_jikes: kaffe VM 1.1.6+cvs ChangeLog head : 2005-11-04 Guilhem Lavaux [EMAIL PROTECTED] glibj.zip compiled with Jikes. kaffe_ecj: kaffe VM 1.1.6+cvs ChangeLog head : 2005-12-05 Guilhem Lavaux [EMAIL PROTECTED] glibj.zip compiled with ecj. Sun's JDK: java full version 1.5.0_06-b05 Compilers: jikes: Jikes Compiler - Version 1.22 Bootclasspath is glibj.zip of kaffe_jikes. jikes_ecj: Jikes Compiler - Version 1.22 Bootclasspath is glibj.zip of kaffe_ecj. ecj: org.eclipse.jdt.core_3.1.1.jar Bootclasspath is glibj.zip of kaffe_ecj. ecj-jikes: org.eclipse.jdt.core_3.1.1.jar Bootclasspath is glibj.zip of kaffe_jikes. gcj: gcj (GCC) 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125) sun: Sun's javac 1.5.0_06 (-source 1.4 -target 1.4) Test/Compiler kaffe_jikes kaffe_ecj Sun's JDK TestSerialVersions/jikes OK OK NG TestSerialVersions/jikes_ecj OK OK NG TestSerialVersions/ecj NG NG NG TestSerialVersions/ecj_jikes NG NG NG TestSerialVersions/gcj OK OK NG TestSerialVersions/sun OK OK NG TestSerialPersistent/jikes OK OK NG TestSerialPersistent/jikes_ecj OK OK NG TestSerialPersistent/ecj NG NG NG TestSerialPersistent/ecj_jikes NG NG NG TestSerialPersistent/gcj OK OK NG TestSerialPersistent/sun NG NG NG TestSerialFields/jikes OK OK NG TestSerialFields/jikes_ecj OK OK NG TestSerialFields/ecj NG NG NG TestSerialFields/ecj_jikes NG NG NG TestSerialFields/gcj OK OK NG TestSerialFields/sun OK OK NG ClassGC/jikesOK OK OK ClassGC/jikes_ecjOK OK OK ClassGC/ecj NG NG OK ClassGC/ecj_jikesNG NG OK ClassGC/gcj NG NG OK ClassGC/sun NG NG OK ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
Re: [kaffe] ecj-compiled kaffe fails in regression tests
Hi, From: pietro ferrari [EMAIL PROTECTED] Date: Fri, 9 Dec 2005 00:37:17 -0200 On 12/8/05, Ito Kazumitsu [EMAIL PROTECTED] wrote: I hope Guilhem's fix will work. it does, but the 3 serial tests still fail :( Since those test cases compiled with jikes, gcj and Sun's javac almost all (but TestSerialPersistent compiled with Sun's javac) pass, the problem seems to exist in ecj. ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
Re: [kaffe] ecj-compiled kaffe fails in regression tests
Hi, From: pietro ferrari [EMAIL PROTECTED] Date: Fri, 9 Dec 2005 00:37:17 -0200 On 12/8/05, Ito Kazumitsu [EMAIL PROTECTED] wrote: I hope Guilhem's fix will work. it does, but the 3 serial tests still fail :( Since those test cases compiled with jikes, gcj and Sun's javac almost all (but TestSerialPersistent compiled with Sun's javac) pass, the problem seems to exist in ecj. ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
Re: [kaffe] ecj-compiled kaffe fails in regression tests
From: Ito Kazumitsu [EMAIL PROTECTED] Date: Fri, 09 Dec 2005 12:50:15 +0900 (JST) Since those test cases compiled with jikes, gcj and Sun's javac almost all (but TestSerialPersistent compiled with Sun's javac) pass, the problem seems to exist in ecj. The TestSerial* tests have this comment in common: // XXX output assumes returned test array is consistently sorted... But it seems that when compiled with ecj, the returned test array is NOT consistently sorted. Sort both *.out and *.fail files and compare them, and you will find that they are identical. So the question is whether the assumption that returned test array is consistently sorted is valid or not. If the assumption is valid, then ecj may be wrong. Otherwise we will have to modify the test programs so that it can check the result without depending on the order of array elements. ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
Re: [kaffe] ecj-compiled kaffe fails in regression tests
From: Ito Kazumitsu [EMAIL PROTECTED] Date: Fri, 09 Dec 2005 13:31:58 +0900 (JST) So the question is whether the assumption that returned test array is consistently sorted is valid or not. If the assumption is valid, then ecj may be wrong. Otherwise we will have to modify the test programs so that it can check the result without depending on the order of array elements. Sun's API document of getDeclaredClasses says nothing about the order of elements in the returned array. So I do not tink it is a good thing to write a program which assumes some special order of elements of the array. So I think Kaffe's TestSerial*.java should be modified. ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
Re: [kaffe] ecj-compiled kaffe fails in regression tests
From: Ito Kazumitsu [EMAIL PROTECTED] Date: Fri, 09 Dec 2005 09:41:24 +0900 (JST) I ran these tests by compiling with various compilers on various VMs. The resuls are attached below. Seeing the results, I have had an impression that (1) TestSerial* tests have something specific to Kaffe because they never produce expected results when run on Sun's JDK. Sun's JDK gives this (when DEBUG is set to true): Generating canonical stream Serializing TestSerialFields$Test0001 Exception: java.lang.IllegalAccessException java.lang.IllegalAccessException: Class TestSerialFields can not access a member of class TestSerialFields$Test0001 with modifiers private at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65) at java.lang.Class.newInstance0(Class.java:344) at java.lang.Class.newInstance(Class.java:303) at TestSerialFields.generateBytes(TestSerialFields.java:529) at TestSerialFields.main(TestSerialFields.java:623) Exception in thread main java.lang.NullPointerException at TestSerialFields.checkClass(TestSerialFields.java:604) at TestSerialFields.main(TestSerialFields.java:633) If Sun's JDK is correct, Kaffe fails to detect this IllegalAccessException and the regression tests have been depending on such behavour of Kaffe. ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
[kaffe] ecj-compiled kaffe fails in regression tests
Using the following poor man's ecj, $ cat bin/ecj #!/bin/sh exec /usr/local/kaffe/bin/kaffe \ -classpath $HOME/javalib/org.eclipse.jdt.core_3.1.1.jar \ org.eclipse.jdt.internal.compiler.batch.Main \ $@ I could make kaffe from kaffe-snapshot-20051206.tar.gz from http://people.debian.org/~avdyk/kaffe/snapshot/. After manually editing some script files, I managed to run make check, but the results were 4 of 148 tests failed Please report to kaffe@kaffe.org Failed were FAIL: TestSerialVersions.java FAIL: TestSerialPersistent.java FAIL: TestSerialFields.java FAIL: ClassGC.java Attached are the diff outputs of *.fail and *.out. Recompiling the sources of test programs with jikes and running them with ecj-compiled glibj.zip gives good results. 0.diff.gz Description: Binary data ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
Re: [kaffe] ecj-compiled kaffe fails in regression tests
Hi Kaz, Using the following poor man's ecj, $ cat bin/ecj #!/bin/sh exec /usr/local/kaffe/bin/kaffe \ -classpath $HOME/javalib/org.eclipse.jdt.core_3.1.1.jar \ org.eclipse.jdt.internal.compiler.batch.Main \ $@ That's a good news! Could you please add something in 'FAQ.classlibrary- compile' for where we can get the jar file and this script? FAIL: TestSerialVersions.java FAIL: TestSerialPersistent.java FAIL: TestSerialFields.java These three fails should have same reason as older version of jikes. When I use jikes-1.18 or jikes-1.19, these three errors are reported. Kiyo ___ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe