Re: Interesting results...

2002-03-23 Thread Dalibor Topic


On Saturday 23 March 2002 00:26, Andrew Dalgleish wrote:
 Should Kaffe's make check include a full test suit for all compilers?

No. There is a project called jacks for that.

I think it would be better if we had an application that loads  links all 
classes from Klasses.jar. That would in turn automatically have them verified 
by the VM. Running that application before checking in a new version of 
Klasses.jar, and as a regression would be a better way to ensure Klasses.jar 
is in a useable state.

Hint: it should be rather easy to code, so if someone feels like devoting a 
couple of minutes to it, go for it.

dalibor topic

_
Do You Yahoo!?
Get your free yahoo.com address at http://mail.yahoo.com




Re: Interesting results...

2002-03-22 Thread Patrick Tullmann


Just a suggestion: could someone strip wc.java down to a testcase that
causes this problem and (assuming its really a compiler problem),
name the testcase BrokenCompilerCheck.java or something?  Put it early
in the test run, too.

That will make diagnosing failures much easier in the future.

-Pat

 Works ok with jikes 1.13.
 
 With jikes == 1.15 built from their tarball, the file
 test/regression/wc.java in CVS gives this error in wc.fail
 
 java.lang.VerifyError: at pc 5 sp 7 not in range [4, 6]
 at java.io.PushbackReader.init(PushbackReader.java:32)
 at java.io.StreamTokenizer.init(StreamTokenizer.java:50)
 at wc.init(wc.java:72)
 at wc.main(wc.java:104)
 
 wc.class.gz attached, but I'm happy to use 1.13



Re: Interesting results...

2002-03-22 Thread Andrew Dalgleish


On Fri, Mar 22, 2002 at 01:17:24PM -0700, Patrick Tullmann wrote:
 Just a suggestion: could someone strip wc.java down to a testcase that
 causes this problem and (assuming its really a compiler problem),
 name the testcase BrokenCompilerCheck.java or something?  Put it early
 in the test run, too.
 
 That will make diagnosing failures much easier in the future.

Once you start down that road, where do you stop?
Should Kaffe's make check include a full test suit for all compilers?


OpenBSD-current, jikes 1.15, kaffe from CVS

I reduced wc.java to this:

import java.io.*;
public class wc {
public static void main(String av[]) {
InputStreamReader isr = new InputStreamReader(null);
StreamTokenizer s = new StreamTokenizer(isr);
}
}
/* Expected Output:

*/

configure, rebuild Klasses.jar, make, make check

I get this in wc.fail:
java.lang.VerifyError: at pc 5 sp 7 not in range [4, 6]
at java.io.PushbackReader.init(PushbackReader.java:32)
at java.io.StreamTokenizer.init(StreamTokenizer.java:50)
at wc.main(wc.java:5)

If I remove the blank line in the 'Expected Output' comment I don't
get any error.



Re: Interesting results...

2002-03-21 Thread Dalibor Topic

On Thursday 21 March 2002 07:28, Mason Loring Bliss wrote:
 On Thu, Mar 21, 2002 at 04:42:13AM +0100, Dalibor Topic wrote:
  Try to rebuild Klasses.jar using jikes 1.13

 I've built Jikes 1.13 and set JIKES = jikes in rebuildLib and Makefile,
 and this is what I see:

 Issued 1 semantic warning compiling java/awt/Toolkit.java:

504. native static synchronized void imgProduceImage(
 ImageNativeProducer prod, Ptr imgData); - *** Warning:
 The type ImageNativeProducer is defined in the file Image.java but
 referenced in the file java/awt/Toolkit.java. It is recommended that it
 be redefined in ImageNativeProducer.java.

That's just jikes complaining about a hack in AWT library code. The code 
should work nevertheless.

I haven't tried the latest jikes from CVS yet, I'll do it today.

Compilers that work for me:
* jikes 1.14
* kjc 1.5b (has other serious bugs, though).
* javac 1.3.1

Compilers that don't work for me:
* javac 1.4.0 : make check fails almost all tests since the warning about 
changed class file format version is not expected by the tests :) May work, 
but will generate lot of assert is a keyword now warnings during 
compilation.
* kjc 2.1A : miscompiles CatchDeath (and a few other tests), so that it fails 
to verify on JDK. since kaffe's verifier doesn't recognize the error, kaffe 
proceeds and does weird things.
* gcj 3.0.4 : fails to compile Klasses.jar due to a bug in gcj.
* javac 1.1.8 : fails to compile Klasses.jar due to bugs in javac.

C-Compilers:
I use gcc 2.95.3. My experience with gcc 3.0.4 was mixed : kaffe compiles, but 
I get more failed tests. I didn't have time to investigate.

Failing tests:
Some tests have really tight watchdog timer settings. They will fail if you 
are using a six year old computer, running KDE 3 alongside, and running kaffe in 
interpreter mode, like I do right now :). I've attached a patch that extends the 
timer on watchdogs that used to fail for me.

Finally, each failing test has a testclass.out and testclass.fail file with 
the expected output and the output of the failed attempt. Inspecting those 
files might provide more insight at what exactly is failing.

hope this helps

dalibor topic


* test/regression/CLTestJLock.java,
test/regression/ProcessClassInst.java,
test/regression/TestUnlock.java: increased watchdog time
limits. Old, slow processors under load had a hard time passing
these tests.



diff -u kaffe/test/regression/CLTestJLock.java patched-kaffe/test/regression/CLTestJLock.java
--- kaffe/test/regression/CLTestJLock.java	Fri Oct 15 05:55:53 1999
+++ patched-kaffe/test/regression/CLTestJLock.java	Wed Mar 20 16:17:50 2002
 -64,7 +64,7 
 	new Thread() {
 	public void run() {
 		try {
-		Thread.sleep(2000);
+		Thread.sleep(9000);
 		} catch (InterruptedException e) { }
 		System.out.println(Time Out. Failure.);
 		System.exit(-1);
diff -u kaffe/test/regression/ProcessClassInst.java patched-kaffe/test/regression/ProcessClassInst.java
--- kaffe/test/regression/ProcessClassInst.java	Fri Feb 12 14:51:09 1999
+++ patched-kaffe/test/regression/ProcessClassInst.java	Wed Mar 20 15:31:41 2002
 -27,11 +27,11 
 static Vector v = new Vector();
 
 public static void main(String av[]) throws Exception {
-	// a watchdog thread that kills us off after 3 sec
+	// a watchdog thread that kills us off after 9 sec
 	new Thread() {
 	public void run() {
 		try {
-		Thread.sleep(3000);
+		Thread.sleep(9000);
 		System.out.println(sorry, you timed out);
 		System.exit(-1);
 		} catch (Exception e) {
diff -u kaffe/test/regression/TestUnlock.java patched-kaffe/test/regression/TestUnlock.java
--- kaffe/test/regression/TestUnlock.java	Fri Feb 12 14:51:11 1999
+++ patched-kaffe/test/regression/TestUnlock.java	Wed Mar 20 16:54:07 2002
 -20,7 +20,7 
 	new Thread() {
 	public void run() {
 		try {
-		Thread.sleep(2000);
+		Thread.sleep(9000);
 		} catch (Exception _) { }
 		System.out.println(Time out.  Failure.);
 		System.exit(-1);



Re: Interesting results...

2002-03-21 Thread Andrew Dalgleish


On Thu, Mar 21, 2002 at 05:17:13PM +1100, Andrew Dalgleish wrote:
 
 On Thu, Mar 21, 2002 at 04:42:13AM +0100, Dalibor Topic wrote:
  Try to rebuild Klasses.jar using jikes 1.13
 
 jikes == 1.13 or jikes = 1.13?
 
 With jikes == 1.15 on OpenBSD-current I get:
 FAIL: DoubleCvt.java
 FAIL: TestSerializable2.java
 FAIL: Alias.java

These three all have this error:
/usr/libexec/ld.so: Undefined symbol _floor called from
lt-Kaffe:/.../kaffe/kaffevm/.libs/libkaffevm.so.0.0 at 0x4006ea7c

If I add libm to LD_PRELOAD they pass.

I'm guessing this bit from configure may be related:
checking whether deplibs are loaded by dlopen... unknown

 FAIL: wc.java

This still gives the same error:
java.lang.VerifyError: at pc 5 sp 7 not in range [4, 6]



Re: Interesting results...

2002-03-21 Thread Jukka Santala


On Thu, 21 Mar 2002, Dalibor Topic wrote:
 Compilers that don't work for me:
 * javac 1.4.0 : make check fails almost all tests since the warning about 
 changed class file format version is not expected by the tests :) May work, 
 but will generate lot of assert is a keyword now warnings during 
 compilation.

How about -target 1.1 ?

 -Jukka Santala




Re: Interesting results...

2002-03-21 Thread Erik Corry


On Thu, Mar 21, 2002 at 05:17:13PM +1100, Andrew Dalgleish wrote:
 
 On Thu, Mar 21, 2002 at 04:42:13AM +0100, Dalibor Topic wrote:
 Try to rebuild Klasses.jar using jikes 1.13
 
 jikes == 1.13 or jikes = 1.13?

jikes == 1.13.

-- 
EC



Re: Interesting results...

2002-03-21 Thread Mason Loring Bliss


On Thu, Mar 21, 2002 at 08:02:11AM +0100, Erik Corry wrote:

  *** Warning: The type ImageNativeProducer is defined in the file Image.java 
but referenced in the file java/awt/Toolkit.java. It is recommended that it be 
redefined in ImageNativeProducer.java.
 
 It's only a warning.

Ah. I hadn't dug into the build infrastructure yet, and I blindly assumed
that make in kaffe/libraries/javalib would give me Klasses.jar, and I
assumed that since it went as quick as it did, it had stopped after the
first warning.

Indeed, using Jikes 1.13 to build Klasses.jar, however it's being done,
I'm able to then say javac foo.java and produce a quite functional
foo.class.

If Klasses.jar is toasty for everyone, would it perhaps make sense for
a corrected version to be committed?

I'm still dead new to Java and class library layout, so I'm not quite
sure where javac fits into things - it seems to be doing the same thing
Jikes does, and it's certainly working, which makes me wonder if it could
actually produce itself now that I've bootstrapped it with Jikes... I
guess I need to hit the FAQs some more and give some more time to my
book. (I'm using Just Java^2, FWIW.)



On Thu, Mar 21, 2002 at 12:52:08PM +0100, Dalibor Topic wrote:

 That's just jikes complaining about a hack in AWT library code. The code 
 should work nevertheless.

And it does. Thanks.


 Compilers that work for me:
 * jikes 1.14
 * kjc 1.5b (has other serious bugs, though).
 * javac 1.3.1

Is kjc a separate project? And, by javac, do you mean Sun's javac?



On Thu, Mar 21, 2002 at 12:52:18PM +0900, Ito Kazumitsu wrote:

 kjc.jar attached to current Kaffe, that is KJC 1.5B, has serious
 bugs.  I suggest you should upgrade KJC to 2.1A or downgrade
 to 1.5A.

Do we build kjc.jar as part of Kaffe? I'm not seeing how to build it from
the source tree I've got here.


Thanks in advance, all, for further clues. As noted, I'm up and running
now, but I'd love to understand more.

-- 
Mason Loring Bliss  awake ? sleep : random()  2 ? dream : sleep;
[EMAIL PROTECTED]  https://acheron.ne.client2.attbi.com/




Re: Interesting results...

2002-03-21 Thread Dalibor Topic


On Thursday, 21. March 2002 13:24, Andrew Dalgleish wrote:
 On Thu, Mar 21, 2002 at 05:17:13PM +1100, Andrew Dalgleish wrote:
  On Thu, Mar 21, 2002 at 04:42:13AM +0100, Dalibor Topic wrote:
   Try to rebuild Klasses.jar using jikes 1.13
 
  jikes == 1.13 or jikes = 1.13?
 
  With jikes == 1.15 on OpenBSD-current I get:

  FAIL: wc.java

 This still gives the same error:
 java.lang.VerifyError: at pc 5 sp 7 not in range [4, 6]

could you post the offending class file?

thanks,

dalibor topic



_
Do You Yahoo!?
Get your free yahoo.com address at http://mail.yahoo.com




Re: Interesting results...

2002-03-21 Thread Dalibor Topic


On Thursday, 21. March 2002 17:30, Mason Loring Bliss wrote:
 On Thu, Mar 21, 2002 at 08:02:11AM +0100, Erik Corry wrote:
 Ah. I hadn't dug into the build infrastructure yet, and I blindly assumed
 that make in kaffe/libraries/javalib would give me Klasses.jar, and I
 assumed that since it went as quick as it did, it had stopped after the
 first warning.

Building Klasses.jar is explained in FAQ/FAQ.classlibrary-compile. Jikes is 
written in C++ and is very fast compared to javac or kjc. Unfortunately, the 
latest version has a couple of showstopper bugs that you got to experience 
first hand. Sorry about that.

 If Klasses.jar is toasty for everyone, would it perhaps make sense for
 a corrected version to be committed?

Yes. :)

Short answer: as soon as someone with CVS write access does it, it will be 
done. Long answer: we had some problems with the CVS server, and trouble 
picking the right version of jikes that generated a Klasses.jar file that 
just worked for everyone. Now that you've verified that everything works 
again with good old lucky number release of jikes (1.13), it's just a 
matter of one of the core developers getting that version, installing it and 
recompiling the class library.

 I'm still dead new to Java and class library layout, so I'm not quite
 sure where javac fits into things - it seems to be doing the same thing
 Jikes does, and it's certainly working, which makes me wonder if it could
 actually produce itself now that I've bootstrapped it with Jikes... I

Here's a short introduction to java compilers:
* jikes: C++ based, fast, open source.
* javac: java based, part of sun's java development kit, proprietary (i guess 
the source is available under one of the pseudo-open source licenses from 
sun).
* kjc: part of the kopi project, java based, free software (GPL).
* gcj: part of gcc 3.0, c/c++ based, free software (GPL).
* kopisusu: fork of kopi 1.4F. seems to have fallen asleep.

there are a few other compilers around, but those are the major ones out 
there.

kaffe provides additional tools beyound the virtual machine, just like the 
proprietary java development kits do. There are scripts in a kaffe 
installation that allow it and the tools to be used under those popular 
names. Kaffe ships with kjc as the java compiler, which can be conveniently 
called via the javac script.

Finally, kjc should be able to compile itself under kaffe. You need to get 
the sources from www.dms.at/kopi first. have fun :)

 On Thu, Mar 21, 2002 at 12:52:08PM +0100, Dalibor Topic wrote:

 Is kjc a separate project? And, by javac, do you mean Sun's javac?

Yes, in that case I meant sun's javac.

 Do we build kjc.jar as part of Kaffe? I'm not seeing how to build it from
 the source tree I've got here.

We don't build kjc as part of kaffe. We just use a precompiled jar file.

hope this helps.

dalibor topic



_
Do You Yahoo!?
Get your free yahoo.com address at http://mail.yahoo.com




Re: Interesting results...

2002-03-21 Thread Jim Pick


 Short answer: as soon as someone with CVS write access does it, it will be
 done. Long answer: we had some problems with the CVS server, and trouble
 picking the right version of jikes that generated a Klasses.jar file that
 just worked for everyone. Now that you've verified that everything works
 again with good old lucky number release of jikes (1.13), it's just a
 matter of one of the core developers getting that version, installing it
and
 recompiling the class library.

Archie check in a version of Klasses.jar compiled with 1.13 (sorry, cvs
commits aren't being posted to the mailing list at the moment because I need
to fix the script).

It seems to work for me with Linux.  I tried cygwin too, but had some
compile probs I'll have to investigate later.

Cheers,

 - Jim





Re: Interesting results...

2002-03-21 Thread Andrew Dalgleish

On Thu, Mar 21, 2002 at 05:33:21PM +0100, Dalibor Topic wrote:
 
 On Thursday, 21. March 2002 13:24, Andrew Dalgleish wrote:
  On Thu, Mar 21, 2002 at 05:17:13PM +1100, Andrew Dalgleish wrote:
   On Thu, Mar 21, 2002 at 04:42:13AM +0100, Dalibor Topic wrote:
Try to rebuild Klasses.jar using jikes 1.13
  
   jikes == 1.13 or jikes = 1.13?
  
   With jikes == 1.15 on OpenBSD-current I get:
 
   FAIL: wc.java
 
  This still gives the same error:
  java.lang.VerifyError: at pc 5 sp 7 not in range [4, 6]
 
 could you post the offending class file?

Works ok with jikes 1.13.

With jikes == 1.15 built from their tarball, the file
test/regression/wc.java in CVS gives this error in wc.fail

java.lang.VerifyError: at pc 5 sp 7 not in range [4, 6]
at java.io.PushbackReader.init(PushbackReader.java:32)
at java.io.StreamTokenizer.init(StreamTokenizer.java:50)
at wc.init(wc.java:72)
at wc.main(wc.java:104)

wc.class.gz attached, but I'm happy to use 1.13



wc.class.gz
Description: application/gunzip


Re: Interesting results...

2002-03-21 Thread Archie Cobbs


Stuart Ballard writes:
  As far as I can see Jikes 1.13 is the one that works.  The
  alternative is to actually find the bug, probably somewhere
  in the verifier.  I tried running with ElectriFence and it
  made no difference, so I don't think it's a malloc bug.
 
 No, the bug is in jikes. Jikes 1.15 is completely broken, jikes 1.15b
 fixes some of the errors but leaves in at least one major one:
 VerifyErrors on any constructor of a non-static inner class that is
 either non-public or calls this(). I've also heard bad things about
 jikes 1.14, but didn't hit any of those personally.
 
 I recommend requiring specifically jikes 1.13 until 1.16 comes out.

FYI,

I just checked in a rebuild Klasses.jar built with jikes v.1.13.

-Archie

__
Archie Cobbs * Packet Design * http://www.packetdesign.com



Re: Interesting results...

2002-03-20 Thread Dalibor Topic


On Thursday 21 March 2002 01:21, Andrew Dalgleish wrote:
 On Wed, Mar 20, 2002 at 06:54:48PM -0500, Mason Loring Bliss wrote:
  Hello, all.
 
  I saw the note about Klasses.jar on the list, rebuilt, and reinstalled.
  That was evidently part of the problem I was seeing, as now javac comes
  back with an error, as opposed to being utterly silent. Here's what I'm

 Hmm. I'm just trying to get Kaffe up on cygwin for the first time.
 make check fails 109 tests with exactly that error.
 A quick double check on OpenBSD-current gets the same 109 failures.

Try to rebuild Klasses.jar using jikes 1.13

dalibor topic

_
Do You Yahoo!?
Get your free yahoo.com address at http://mail.yahoo.com




Re: Interesting results...

2002-03-20 Thread Ito Kazumitsu


In message Interesting results...
on 02/03/20, Mason Loring Bliss [EMAIL PROTECTED] writes:

 java.lang.VerifyError: at pc 5 sp 7 not in range [4, 6]
 at java.io.PushbackReader.init(PushbackReader.java:32)
 at at.dms.compiler.tools.antlr.extra.InputBuffer.init(InputBuffer.java:68)
 at at.dms.compiler.tools.antlr.extra.InputBuffer.init(InputBuffer.java:81)
 at at.dms.kjc.Main.parseFile(Main.java:278)
 at at.dms.kjc.Main.run(Main.java:116)
 at at.dms.kjc.Main.compile(Main.java:68)
 at at.dms.kjc.Main.main(Main.java:59)

kjc.jar attached to current Kaffe, that is KJC 1.5B, has serious
bugs.  I suggest you should upgrade KJC to 2.1A or downgrade
to 1.5A.



Re: Interesting results...

2002-03-20 Thread Andrew Dalgleish


On Thu, Mar 21, 2002 at 04:42:13AM +0100, Dalibor Topic wrote:
 Try to rebuild Klasses.jar using jikes 1.13

jikes == 1.13 or jikes = 1.13?

With jikes == 1.15 on OpenBSD-current I get:
FAIL: DoubleCvt.java
FAIL: TestSerializable2.java
FAIL: Alias.java
FAIL: wc.java

With jikes == 1.13 on Cygwin I get:
FAIL: StackDump.java
FAIL: UncaughtException.java
FAIL: Preempt.java
FAIL: Alias.java
FAIL: NullInvoke.java
FAIL: LostFrame.java
FAIL: ProcessTest.java
FAIL: wc.java
FAIL: finalexc.java
FAIL: KaffeVerifyBug.java
FAIL: CharArrayReaderTest.java
FAIL: LineNumberReaderTest.java
FAIL: BufferedReaderTest.java
FAIL: ExceptionInInitializerTest.java
FAIL: ProcessClassTest.java
FAIL: ProcessClassInst.java
FAIL: ExecTest.java
with a few crashes and a few hangs.

I'm rebuilding with debug symbols now.



Re: Interesting results...

2002-03-20 Thread Erik Corry


On Thu, Mar 21, 2002 at 01:28:07AM -0500, Mason Loring Bliss wrote:
 
 I've built Jikes 1.13 and set JIKES = jikes in rebuildLib and Makefile,
 and this is what I see:
 
 acheron /usr/local/src/kaffe/libraries/javalib# make classes
 /bin/sh ./rebuildLib
 Compiling classes ...
 
 Issued 1 semantic warning compiling java/awt/Toolkit.java:
 
504. native static synchronized void imgProduceImage( ImageNativeProducer prod, 
Ptr imgData);
  -
 *** Warning: The type ImageNativeProducer is defined in the file Image.java but 
referenced in the file java/awt/Toolkit.java. It is recommended that it be 
redefined in ImageNativeProducer.java.

It's only a warning.

 I'll try a newer Jikes tomorrow, I guess. (Mm, cvs update -r foo.)

As far as I can see Jikes 1.13 is the one that works.  The
alternative is to actually find the bug, probably somewhere
in the verifier.  I tried running with ElectriFence and it
made no difference, so I don't think it's a malloc bug.

-- 
Erik Corry [EMAIL PROTECTED]



Re: Interesting results...

2002-03-20 Thread Andrew Dalgleish


On Thu, Mar 21, 2002 at 05:17:13PM +1100, Andrew Dalgleish wrote:
 
 With jikes == 1.13 on Cygwin I get:
 FAIL: StackDump.java

I've rebuilt Kaffe with debug symbols.
It seems I'm getting a sigsegv in cygwin1.dll.
Rebuilding cygwin now...