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: Klasses.jar needs to be rebuilt

2002-03-19 Thread Archie Cobbs


Dalibor Topic writes:
 My bad. I changed the native implementation of java.Class.newInstance to a 
 pure java one, and deleted the now unnecessary  native implementation without 
 telling Archie to regenerate klasses.jar.
 
 will be fixed soon, I hope

OK, I rebuilt Klasses.jar. Sorry for the delay checking it in,
there was a problem with disk space on the CVS server.

-Archie

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



Re: VerifyError in PushbackReader

2002-03-16 Thread Archie Cobbs


Erik Corry writes:
 Whenever I try to run a program (javac, HelloWorld, appletviewer)
 I get the same error:
 
 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)

I'm pretty sure it's a verifier problem. I've seen this before,
and when I sent the classfile to the jikes people, they said it
looked fine to them.

You might try rebuilding Klasses.jar with jikes or kjc (whichever
wasn't used before) as a possible workaround..

I don't know who knows about the verifier but it needs a
review apparently...

-Archie

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



Re: C librairies

2001-12-07 Thread Archie Cobbs


Bruno Amouretti writes:
 I'd like to add specific classes to Kaffe, that are
 already written in C.
 Has anybody an idea about where I can get information
 about this (for Kaffe or at least JVMs in general)?

Sounds like you'll want to use the Java native interface:

http://java.sun.com/j2se/1.3/docs/guide/jni/spec/jniTOC.doc.html

-Archie

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



Re: flestmail - daily - 6/11 passed (54.5%) (0 errors, 5 failures)

2001-11-30 Thread Archie Cobbs


 FAIL  build
 --
 Excerpts from 
/foo/z/flest/testdir/kaffe_flest/--with-engine=jit3__enable-debug/build.log
 ...
 
 
254.   name = (String)e.getValue();
^
 *** Error: The type java/util/Map$Entry with default access is not visible here.
 gmake[1]: *** [lib/stamp] Error 1
 gmake[1]: Leaving directory 
`/foo/z/flest/testdir/kaffe_flest/--with-engine=jit3__enable-debug/obj-kaffe_flest/libraries/javalib'
 gmake: *** [Klasses] Error 2
 close failed: , status 512
 fatal: build failed
 --

Could whoever is responsible for this test setup please update
jikes to version 1.15 ? This problem is due to a bug in jikes
(I think).

Thanks,
-Archie

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



Re: [PATCH] java.io.IOException

2001-11-18 Thread Archie Cobbs


Dalibor Topic writes:
 the import statement for java.lang.String in kaffe's
 implementation of
 java.io.IOException is superfluous, since classes from
 java.lang.* are
 imported automatically.

So do a zillion other files.. see the output below of:

  find . -name '*.java' | xargs grep -lwE 'import[[:space:]]+java\.lang\.[A-Za-z_]+;'

Surely a perl wizard could fix this programmatically in no time.. :-)

-Archie

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

java/io/BufferedWriter.java
java/io/ByteArrayOutputStream.java
java/io/CharArrayWriter.java
java/io/CharConversionException.java
java/io/DataInput.java
java/io/DataOutput.java
java/io/EOFException.java
java/io/File.java
java/io/FileInputStream.java
java/io/FileNotFoundException.java
java/io/FileOutputStream.java
java/io/FileReader.java
java/io/FileWriter.java
java/io/FilenameFilter.java
java/io/FilterWriter.java
java/io/IOException.java
java/io/InputStreamReader.java
java/io/InterruptedIOException.java
java/io/InvalidClassException.java
java/io/InvalidObjectException.java
java/io/LineNumberReader.java
java/io/NotActiveException.java
java/io/NotSerializableException.java
java/io/ObjectInputStream.java
java/io/ObjectOutputStream.java
java/io/ObjectStreamClass.java
java/io/ObjectStreamException.java
java/io/OutputStreamWriter.java
java/io/PrintWriter.java
java/io/StreamCorruptedException.java
java/io/StreamTokenizer.java
java/io/Writer.java
java/io/StringReader.java
java/io/StringBufferInputStream.java
java/io/StringWriter.java
java/io/SyncFailedException.java
java/io/UTFDataFormatException.java
java/io/UnsupportedEncodingException.java
java/io/WriteAbortedException.java
java/lang/ref/ReferenceQueue.java
java/lang/NullSecurityManager.java
java/lang/SecurityManager.java
java/lang/reflect/Constructor.java
java/lang/reflect/Field.java
java/lang/reflect/Member.java
java/lang/reflect/Method.java
java/lang/reflect/AccessibleObject.java
java/lang/Thread.java
java/math/BigDecimal.java
java/math/BigInteger.java
java/net/Socket.java
java/net/BindException.java
java/net/ConnectException.java
java/net/ContentHandlerFactory.java
java/net/PlainSocketImpl.java
java/net/FileNameMap.java
java/net/HttpURLConnection.java
java/net/InetAddress.java
java/net/InetAddressImpl.java
java/net/MalformedURLException.java
java/net/NoRouteToHostException.java
java/net/ProtocolException.java
java/net/ServerSocket.java
java/net/URL.java
java/net/SocketException.java
java/net/SocketImpl.java
java/net/URLConnection.java
java/net/URLEncoder.java
java/net/URLStreamHandler.java
java/net/URLStreamHandlerFactory.java
java/net/UnknownHostException.java
java/net/UnknownServiceException.java
java/text/ChoiceFormat.java
java/text/CollationKey.java
java/text/DateFormat.java
java/text/DateFormatSymbols.java
java/text/DecimalFormat.java
java/text/DecimalFormatSymbols.java
java/text/MessageFormat.java
java/text/NumberFormat.java
java/text/ParseException.java
java/text/SimpleDateFormat.java
java/text/SimpleLineIterator.java
java/text/SimpleWordIterator.java
java/util/BitSet.java
java/util/Date.java
java/util/EventObject.java
java/util/GregorianCalendar.java
java/util/zip/ZipInputStream.java
java/util/ListResourceBundle.java
java/util/Locale.java
java/util/MissingResourceException.java
java/util/NoSuchElementException.java
java/util/PropertyResourceBundle.java
java/util/Random.java
java/util/ResourceBundle.java
java/util/StringTokenizer.java
java/util/Vector.java
java/util/TooManyListenersException.java
java/util/Arrays.java
java/util/Collections.java
java/util/Properties.java
kaffe/applet/AudioPlayer.java
kaffe/applet/AppletTag.java
kaffe/awt/ExportTransferable.java
kaffe/awt/ImageClass.java
kaffe/awt/ImageDict.java
kaffe/awt/ImageSpec.java
kaffe/io/ByteToCharConverter.java
kaffe/io/CharToByteConverter.java
kaffe/io/ClassLoaderObjectInputStream.java
kaffe/io/DefaultSerializationFactory.java
kaffe/io/ObjectInputStreamImpl.java
kaffe/io/ObjectStreamClassImpl.java
kaffe/io/SerializationFactory.java
kaffe/jar/ExecJar.java
kaffe/jar/ExecJarName.java
kaffe/lang/SystemClassLoader.java
kaffe/lang/DummyClassLoader.java
kaffe/lang/Application.java
kaffe/lang/ApplicationException.java
kaffe/management/JIT.java
kaffe/net/DefaultFileNameMap.java
kaffe/net/DefaultURLStreamHandlerFactory.java
kaffe/util/Assert.java
kaffe/util/Deprecated.java
kaffe/util/NotImplemented.java
kaffe/util/NotImplementedReport.java
kaffe/util/IdentityHashtable.java
kaffe/util/IntegerHashtable.java
kaffe/util/IntegerIntegerHashtable.java
kaffe/util/LongHashtable.java
kaffe/util/SupportDisabled.java



[Jikes] IBM releases Jikes Research Virtual Machine on developerworks(fwd)

2001-10-15 Thread Archie Cobbs


FYI-

-Archie

 From [EMAIL PROTECTED] Mon Oct 15 09:20:01 2001
 From: David Shields [EMAIL PROTECTED]
 Subject: [Jikes] IBM releases Jikes Research Virtual Machine on developerworks
 Date: Mon, 15 Oct 2001 11:46:15 -0400
 
 Just to let you know that IBM Research has just released the Jikes
 Research Virtual Machine (RVM) on developerworks:
 
   http://oss.software.ibm.com/developerworks/projects/jikesrvm
 
 The RVM is designed to execute Java programs that are typically used
 in research on fundamental virtual machine design issues. It will
 provide academic and research communities with a flexible testbed to
 prototype new virtual machine technologies and experiment with
 different design alternatives. It runs on the AIX/PowerPC,
 Linux/PowerPC, and Linux/IA-32 platforms, and exhibits
 industry-strength performance for many benchmark programs on the first
 two of these platforms.
 
 The Jikes RVM includes the latest VM technologies for dynamic
 compilation, adaptive optimization, garbage collection, thread
 scheduling, and synchronization. The Jikes RVM is implemented in the
 Java programming language.
 
 It was originally hoped to release the project using the name
 Jalapeno that was internally used during its development. However,
 it turns out some company has a claim on this name, so we decided to
 use Jikes, as we have done before for projects from the Software
 Technology department here at IBM Research.
 
 The project has no direct link to the Jikes Compiler Project other
 than requiring the  Jikes compiler for its compilation. Indeed, this is the
 reason Jikes supports the the +K option.
 
 dave


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



Re: kaffe native interface

2001-05-07 Thread Archie Cobbs


Nic Ferrier writes:
 Or is it simply that jni was firmed up long after most of kaffe was
 written and native is the historic native interface for Kaffe?

Yep..

-Archie

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



Re: a patch to java.util.Properties.java

2001-04-12 Thread Archie Cobbs


Ito Kazumitsu writes:
 This is a patch to java.util.Properties.java, without which
 load(InputStream) goes into an infinite loop if end of file
 appears before '\n'.
 
 --- Properties.java.orig  Sat Jul 22 07:53:23 2000
 +++ Properties.java   Mon Apr  9 15:46:39 2001
 @@ -162,7 +162,11 @@
   switch (ch) {
   case '#':
   case '!':
 - while ((ch = in.read()) != '\n');
 + while (true) {
 + ch = in.read();
 + if (ch == -1) return false;
 + if (ch == '\n') break;
 + }
   continue;
   case -1:
   return false;

Thanks, should be fixed now.

-Archie

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



Re: [Patch] System.lang.setProperty() method is lacked

2001-04-12 Thread Archie Cobbs


Takashi Okamoto writes:
 Kaffe's java.lang.System doesn't have setProperty() method.
 Please add it.

Done..

-Archie

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



Re: question about kaffec

2001-03-25 Thread Archie Cobbs


Dan Stanger/Donna Stanger writes:
 does kaffe currently do recursive compilation, that is if class a
 depends on b and
 the command javac a.java is issued, will b.java be compiled also?
 thanks,

This is a property of the compiler, not the runtime.

But yes all Java compilers I know of do this, in fact,
the compilation will fail if b.java is not found and
compilable.

-Archie

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



ANT fix

2001-03-07 Thread Archie Cobbs


Archie Cobbs wrote:
   My patch throw IndexOutOfBoundsException() when offset (off) and
   length (len) are invalid, and exit method when length is 0.
   (I refered SUN's java/util/zip/* and modified them.)
 
  Should be fixed.

Just to be clear, I didn't use the fix posted because it was
'tainted' by exposure to Sun's implementation.

-Archie

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



Re: minus java.net

2001-03-06 Thread Archie Cobbs


Umar Saif writes:
 I am trying to compile kaffe without the networking support (by
 removing the java.net dependency from the Makefiles in javalib),
 but my system.out wouldn't work. My files compiles (which just
 system.outs Hello world) but gives no output on kaffevm.
 
 Does anyone know if kaffe bootstrap has dependencies on java.net
 code (Socket, Inet etc) and where does it get called ?

Nothing comes to mind but I wouldn't be surprised if it did..

You could do an experiment to see.. unzip normal Klasses.jar into
a tree and start deleting classfiles a few at a time..

-Archie

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



Re: [PATCH] for bug #756(Ant doesn't work)

2001-03-06 Thread Archie Cobbs


Takashi Okamoto writes:
 I made patch for bug #756 that Jakartra-Ant (Java Build tool) doesn't
 work with Kaffe. Error occurs when buffer length (len) is 0 at
 write(byte[] buf, int off, int len) method  in
 java/util/zip/ZipOutputStream.java and java/util/zip/DeflateOutputStream.java
 
 My patch throw IndexOutOfBoundsException() when offset (off) and
 length (len) are invalid, and exit method when length is 0.
 (I refered SUN's java/util/zip/* and modified them.)
 
 Ant will be one of most important software for Java. 
 Please fix this problem.

Should be fixed.

Thanks,
-Archie

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



Re: java.util.Hashtable: difference between JDK and kaffe

2001-01-26 Thread Archie Cobbs


Ito Kazumitsu writes:
 Attached patch solves this problem.
 
 bash$ diff -u ~/kaffe/cvs/kaffe/libraries/javalib/java/util/HashMap.java HashMap.java
 --- /home/ito/kaffe/cvs/kaffe/libraries/javalib/java/util/HashMap.javaFri 
Apr  7 06:46:16 2000
 +++ HashMap.java  Fri Jan 26 17:22:35 2001
 @@ -234,7 +234,8 @@
  
   private Entry find(Object key, int bucket) {
   for (Entry e = table[bucket]; e != null; e = e.next) {
 - if (key == null ? e.key == null : key.equals(e.key)) {
 + // if (key == null ? e.key == null : key.equals(e.key)) {
 + if (e.key == null ? key == null : (e.key).equals(key)) {
   return e;

If x.equals(y) != y.equals(x) then all bets are off.  The
StringKey.equals() method is broken. JDK just happens to mask
the problem.

-Archie

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



Re: Policy security implementation in Kaffe.

2000-11-17 Thread Archie Cobbs


Yee Keat MOEY writes:
   I have been looking at some Kaffe java file (related to Policy based 
 Security) . I notice that there are a few java files that are not fully  
 implemented  or not been implemented at all, for example,
 SecurityManager.java, AccesssController.java, Policy.java and etc. Could
 anyone tell me what are the status on these files ? Are there anyone
 working on it ?

I don't know of any active effort to finish the Security stuff.
Any new work would be welcome.

-Archie

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



Re: kaffe wont' recognize that gmp is installed

2000-11-05 Thread Archie Cobbs


sipher ? writes:
 I'm having a problem getting Kaffe to recognize that I have installed gmp.  
 I got the error bellow so I wnet back and installed gmp and then 
 reconfigured, recompiled, and reinstalled kaffe.  When that didn't work I 
 deleted my kaffe directory entirely and started fresh adn that still didn't 
 work.  I still get this error:
 
 java.lang.ExceptionInInitializerError: [exception was 
 kaffe.util.SupportDisabled
 : GNU gmp was not found by Kaffe configure script]
 at java.lang.Class.forName(Class.java:native)
 at java.lang.Class.forName(Class.java:52)
 kaffe.util.SupportDisabled: GNU gmp was not found by Kaffe configure script

Start by looking in the config.log file to see why the configure
test that checks for it is erroneously failing.

-Archie

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



Re: jar tool bug

2000-10-29 Thread Archie Cobbs


Nic Ferrier writes:
  Patrick Tullmann [EMAIL PROTECTED] 27-Oct-00 6:17:00 PM 
 
 The jar tool blows up if a zero-byte manifest file is provided.
 Sun's jar tool does not blow up.  

Can whoever saw this problem test the patch below?

-Archie

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

Index: Manifest.java
===
RCS file: /cvs/kaffe/kaffe/libraries/javalib/java/util/jar/Manifest.java,v
retrieving revision 1.4
diff -u -r1.4 Manifest.java
--- Manifest.java   2000/01/10 10:41:17 1.4
+++ Manifest.java   2000/10/28 18:56:57
@@ -243,7 +243,7 @@
 
// Jump here when we get EOF
} catch (EOFException e) {
-   if (numChunks == 0 || state != ST_START) {
+   if (state != ST_START) {
throw new IOException("premature EOF, line " + lineno);
}
}



Re: CharToByteEUC_JP.java instead of CharToByteEUC_JP.ser

2000-10-29 Thread Archie Cobbs


Edouard G. Parmelan writes:
  I am afraid kaffe/io/CharToByteEUC_JP.ser does not work
  properly, so I have made kaffe/io/CharToByteEUC_JP.java
  myself.  It can be found at
  
 http://www.maczuka.gcd.org/programs/CharToByteEUC_JP.tar.gz
  
  I must say that JIS0212-related parts of the program has not
  been tested.
 
 Where I can find documents about EUC and EUC-JP ?  Have you plan to
 write ByteToCharEUC_JP class ?

Here's a good ref:

  http://www.lfw.org/text/jp.html

-Archie

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



Re: jar tool bug

2000-10-27 Thread Archie Cobbs


Patrick Tullmann writes:
 The jar tool blows up if a zero-byte manifest file is provided.  Sun's 
 jar tool does not blow up.  Here's how to reproduce it:

Sun is wrong :-) A valid manifest file always starts with

  Manifest-Version: 1.0

But we should probably be compatible I guess.

-Archie

Ref: http://java.sun.com/products/jdk/1.2/docs/guide/jar/manifest.html

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



Announcing new version of LaTTe JVM and JIT Compiler (fwd)

2000-10-25 Thread Archie Cobbs


FYI-
-Archie

- Forwarded message from Prof. Soo-Mook Moon -

From [EMAIL PROTECTED] Wed Oct 25 06:48:40 2000
Date: Wed, 25 Oct 2000 20:20:53 +0900 (KST)
From: "Prof. Soo-Mook Moon" [EMAIL PROTECTED]
Message-Id: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Announcing new version of LaTTe JVM and JIT Compiler
Content-Length:  3369

 My apologies if you receive multiple copies...

=
Subject: Announcing new release of LaTTe open-source Java Virtual Machine,
 with performance improvements

Version 0.9.1 of the LaTTe virtual machine has been released.  LaTTe is a
freely available virtual machine intended to execute Java classes.  It
can be obtained from http://latte.snu.ac.kr/.

LaTTe is research prototype for the study of dynamic (just-in-time)
compilation techniques.  Among its features are:

* A fast and effective JIT compiler with
  - efficient register mapping and allocation
  - "traditional" optimizations (e.g., common subexpression elimination)
  - object-oriented optimizations (e.g., customization and specialization)

* A limited framework for adaptive compilation, which is currently
  based on method run counts.

* A reasonably fast bytecode interpreter, intended to be used with
  the adaptive compilation framework.

* Lightweight monitors.

* On-demand translation of exception handlers.

* A fast, non-incremental garbage collector.

As a result, the performance of the LaTTe JVM is competitive with that
of commercial JVMs, such as Sun's JDK 1.2 production release and
JDK 1.3 release candidate client/server VMs.

Changes from version 0.9.0 include:

* Addition of new optimizations such as faster class inclusion tests,
  LOOKUPSWITCH optimization, de-virtualization of method invocations, and
  the use of native 64 bit instructions. These result in a 10% performance
  improvement in our benchmarks.

* Refinements in exception handling.

* Improved garbage collector, which now does selective sweeping.

On UltraSPARC, LaTTe 0.9.1 is better than the latest Sun JVMs by as much as
a geometric mean of 25% on SPECjvm98, and of 30% on Java Grande, in elapsed
time measurements.

LaTTe was initially based on Kaffe 0.9.0, although much code has now been 
rewritten in a clean room environment.  LaTTe runs on top of Solaris 2.5 or
higher on UltraSPARCs.

LaTTe was developed by the MASS Laboratory at Seoul National University, 
with sponsorship from IBM T.J. Watson Research Center.  It is free software, 
being licensed under BSD-like terms.

To obtain source code, documentation, and support, please visit
http://latte.snu.ac.kr/.  This site also contains many publications
describing the algorithms used in the LaTTe JVM.

We invite volunteers worldwide to join our LaTTe open-source development
team and help us implement the exciting, leading edge JIT compiler, VM and
instruction level parallelism optimizations to come. One on-going project 
where we would like help now is to integrate LaTTe back into the current 
version of Kaffe.

===
Thank you for your time in reading this announcement.

If you have any questions about LaTTe, or would like to join our team,
please contact us at [EMAIL PROTECTED], and we will be happy to help 
to the extent we can.  Please feel free to pass this announcement on to other
colleagues who might be interested.  We hope you will enjoy the LaTTe web site.


Prof. Soo-Mook Moon
Seoul National University
[EMAIL PROTECTED]

Dr. Kemal Ebcioglu
IBM T.J. Watson Research Center
[EMAIL PROTECTED]

* Sun, Java, UltraSPARC, Solaris are trademarks of Sun.

- End of forwarded message from Prof. Soo-Mook Moon -
__________
Archie Cobbs * Packet Design * http://www.packetdesign.com



Re: Kaffe/Alpha - bug fix ? finally?

2000-10-10 Thread Archie Cobbs


[EMAIL PROTECTED] writes:
 On Mon, 09 October 2000, Archie Cobbs wrote:
  It's good to hear that your assertion failure was fixed,
  but your fix sortof doesn't make sense. "osize" is the
  correct thing to copy there, because the original memory
  region presumably was only "osize" bytes long.
 
 Pardon me if I am being dumb. Trying to debug the
 assertion failure was my first brush with Kaffe sources. Could you take a minute to 
straighten out
 the following understanding of mine of the gcRealloc()
 function?
 
 The purpose of the function is to reallocate
 memory, 'mem', to size 'size'. It checks if the
 current size of 'mem', 'osize', is = 'size' + some
 additional chunk. If it is, it means that 'mem'
 can hold chunk of size 'size' and hence it need
 not reallocate. If 'osize' is  'size' + sizeof
 (gc_unit), it has to reallocate memory to the 
 requested size, 'size' and not 'osize'. 
 
 From your message it seems like I am horribly 
 mistaken in my understanding of the function.

No, that is exactly correct. But in addition realloc
is supposed to not alter the original memory contents,
of which there are "osize" bytes. That is why only
"osize" bytes need to be copied.

The size - osize additional new bytes are just left
uninitialized (actually they'll be zeroed I think).

-Archie

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: Kaffe/Alpha - bug fix ? finally?

2000-10-09 Thread Archie Cobbs


[EMAIL PROTECTED] writes:
 Finally it seems like I might have fixed the
 assertion failure that has been bothering me
 on my Linux/Alpha box.
 
 In gcRealloc():kaffe/kaffevm/mem/gc-incremental.c
 line 1026 it looks like the size of memcpy should
 be size instead of osize. If the osize (original/old
 size ?) is less than size+sizeof(gc_unit) isn't it
 logical to copy size number of bytes instead of
 osize? Anyways I made the fix in my local sources
 and ran 'make check'. 25 tests failed but atleast
 I seem to have gotten past the assertion failure.
 
 If this is indeed the fix, change line 1026
 in the above said file to 
 
 memcpy(newmem,mem,size);
 
 in the CVS tree.

It's good to hear that your assertion failure was fixed,
but your fix sortof doesn't make sense. "osize" is the
correct thing to copy there, because the original memory
region presumably was only "osize" bytes long.

However, there may be some other code that calls gcRealloc()
with the wrong (i.e., too small) value for the "osize" parameter,
causing some data to not get copied.

-Archie

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



TreeMap

2000-09-26 Thread Archie Cobbs


I've checked in that patch.. but here's a question. Why doesn't
kaffe (with the old TreeMap) run out of memory when the program
below is run? Maybe just chance?

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com

import java.util.*;

public class TreeMapTest {
public static void main(String[] args) {
long seed = System.currentTimeMillis();
if (args.length  0)
seed = Long.parseLong(args[0]);
System.out.println("Random seed is " + seed);
Random r = new Random(seed);

TreeMap t = new TreeMap();
for (int i = 0; i  1000; i++) {
Integer value = new Integer(r.nextInt() % 37);
if (r.nextBoolean())
t.put(value, null);
else
t.remove(value);
}

System.out.print("Keys:");
for (Iterator i = t.keySet().iterator(); i.hasNext(); )
System.out.print(" " + i.next());
System.out.println();
System.out.println("Free mem: "
+ Runtime.getRuntime().freeMemory());
}
}




Re: minor java.util.TreeMap bug

2000-09-25 Thread Archie Cobbs


Timothy Stack writes:
 I don't know if this is a real bug or not, but in java.util.TreeMap
 there's this line in deleteNode:
 
 325:  x.parent = y.parent;
 
 The problem is that x can be NIL which is a global variable, which seems
 bad.  One might think a quick fix would be to test for NIL and not set the
 parent, but this causes more grief because the other functions reference
 parent without checking if its non-nil.  Probably not a big problem, just
 thought i'd let you know.

I think this is OK because NIL.parent is never actually used.

I haven't verified this rigourously but it makes sense if you
think about it, because NIL is the child of all leaf nodes, so
NIL has many actual parents.

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: emjava-----awt

2000-09-25 Thread Archie Cobbs


 Hello!
   If I want  to port kaffe to embeded envirment,then how can I deal with the awt 
that related to X11 lib?
 Best regards!
   yours Tianchin

Kaffe will omit the awt stuff if X11 is not detected by ./configure.

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: ResourceBundle

2000-09-19 Thread Archie Cobbs


YAMAGUCHI Yuji writes:
 java.lang.ExceptionInInitializerError: [exception was java.lang.SecurityException]
   at java.util.ResourceBundle.getBundleWithLocale(ResourceBundle.java:84)
   at java.util.ResourceBundle.getBundle(ResourceBundle.java:42)
   at java.util.ResourceBundle.getBundle(ResourceBundle.java:30)
   at ResourceBundleTest.main(ResourceBundleTest.java:12)
 java.lang.SecurityException
   at java.lang.Throwable.fillInStackTrace(Throwable.java:native)
   at java.lang.Throwable.init(Throwable.java:33)
   at java.lang.Exception.init(Exception.java:20)
   at java.lang.RuntimeException.init(RuntimeException.java:17)
   at java.lang.SecurityException.init(SecurityException.java:17)
   at java.lang.SecurityManager.checkPermission(SecurityManager.java:98)
   at java.lang.SecurityManager.init(SecurityManager.java:24)
   at kaffe.lang.DummyClassLoader.init(DummyClassLoader.java:25)
   at java.lang.Throwable.printStackTrace(Throwable.java:56)
   at java.util.ResourceBundle.getBundleWithLocale(ResourceBundle.java:84)
   at java.util.ResourceBundle.getBundle(ResourceBundle.java:42)
   at java.util.ResourceBundle.getBundle(ResourceBundle.java:30)
   at ResourceBundleTest.main(ResourceBundleTest.java:12)

Look's like kaffe's SecurityManager class is still incomplete.
It shouldn't be too hard to fix.. patches welcome.

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: JNI Problem

2000-09-15 Thread Archie Cobbs


Patrick Tullmann writes:
  ---
 gcc -c -fPIC Hello.c -o Hello.o
 ld -shared -o libHello.so Hello.o
  ---
 
 You're going to have to libtoolize your shared library for Kaffe to
 find it.  At least, I've never been able to load non-libtoolized
 shared libraries.  I find this to be pretty bogus myself.

I've not had that problem.. kaffe seems to find and load "normal"
shared libraries fine under FreeBSD.. 

 Running Kaffe with '--vmdebug NATIVE_LIB' will show where Kaffe is
 actually looking.  (You will have to have compiled Kaffe with
 --enable-debug.)

Definitely a good recommendation.

-Archie

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: Questions about Kaffe RMI!!

2000-08-30 Thread Archie Cobbs


David Ramirez writes:
 I have been working with Kaffe 1.0.6 (Thanks Archie for the advice) and
 RMI.  In a local level it works fine (Server/Client in the same
 machine), but when I try to connect  Kaffe's RMI (As Server or as
 Client) to another machine (with JDK's1.1.8 RMI as Server or Client) it
 does not work, there is an exception:
 
 java.lang.reflect.InvocationTargetException
 and then: java.rmi.UnExpectedException: nested exception is: null
 
 Well, I would like to know (I would really appreciate any answer, please
 :)  ) :
 
 Does anyone knows how to Solve the problem?
 
 Does anyone knows how to comunicate Kaffe's RMI with another VM (J.D.K
 RMI remote) ?
 
 Has anyone  work with Kaffe and RMI ? Is there a secret or something in
 order to make RMI run under Kaffe?
 
  I think that Kaffe does not work with RMI. !!

You may be right. I don't know of anyone who has got it working
in a non-trivial application. I think this area is ripe for
someone to come in and fix a few things.

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: SecurityManager abstract - incorrect?

2000-08-26 Thread Archie Cobbs


Nic Ferrier writes:
 The class java.lang.SecurityManager is declared abstract. In Sun's
 JDK1.2 it is not declared abstract, it is possible to create new
 objects of class SecurityManager (Paperclips has code dependant on
 that).

Fixed now..

 Also:
 
Calendar.roll(int field,int amount) 
 
 and:
 
 GregorianCalendar.roll(int field,int amount)
 
 are missing from Kaffe.

Haven't looked at these yet.. patches welcome.

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: Compilation error on OpenBSD

2000-08-25 Thread Archie Cobbs


Oliver Cope writes:
 I've been trying for a while to get kaffe installed on my OpenBSD 2.7 machine, but 
without success.  I've downloaded version 1.0.6 and run the standard ./configure  
make, only to come up againt the following error:
 
 gcc -g -O2 -Wall -Wstrict-prototypes -o .libs/Kaffe main.o version.o .libs/KaffeS.o  
-lgmp -L/usr/local/lib ../../libraries/clib/math/.libs/libmath.a -lz 
../../libraries/clib/zip/.libs/libzip.a ../../libraries/clib/native/.libs/libnative.a 
-L../kaffevm/.libs -lkaffevm -L../xprof/.libs -lkaffexprof -lm -R/opt/kaffe1.0.6/lib 
-R/usr/local/lib
 ld: -lkaffevm: no match
 collect2: ld returned 1 exit status
 
 I don't know why it wants to link with kaffevm -- there are no
  matching files anywhere in the source tree.  Can anyone help me
  out with this?

Note the "-L../kaffevm/.libs -lkaffevm" .. there should be a
libkaffevm built already in the kaffe/kaffevm sudirectory.

If there isn't one then maybe the build failed earlier during
that part.

-Archie

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: missing files, while compile Kaffe

2000-08-14 Thread Archie Cobbs


Mansuroglu Seki writes:
 - Download setup.exe from cygwin and all GNU-packages they are supported (Is it
 OK ? Do I need to intall automake or autoconf from GNU).
 - copy kaffe-1.0.6 in the same directory as setup.exe.
 - execute setup.exe with 'd:\cygwin' as the install directory.
 - start cygwin bash shell.
 - cd to ''
 - run './configure'. (I didn't receive any errors. After it  only the following
 header-files were created:
 d:\cygwin\kaffe\config\config.h
 d:\cygwin\kaffe\include\jtypes.h
 d:\cygwin\kaffe\libltdl\config.h
 The three java_lang-files were not created.)
 - cd to 'd:\cygwin\kaffe\kaffe\kaffe'
 - run make (the same error)
 
 Did I follow the right way?

That sounds right to me, but I'm not very familiar with cygwin, etc.
Maybe some Windows users can help out here.

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: missing files, while compile Kaffe

2000-08-11 Thread Archie Cobbs


Mansuroglu Seki writes:
 ../kaffevm/thread.h:19: java_lang_Throwable.h: No such file or directory
 
 ../kaffevm/thread.h:20: java_lang_Thread.h: No such file or directory
 ../kaffevm/thread.h:21: java_lang_ThreadGroup.h: No such file or
 directory
 make: *** [main.o] Error 1

These files are not part of the distributed source, but they
get generated during compile time. You should see a bunch of
header files generated using kaffeh and Klasses.jar before
the build gets to this point.

Hmm.. try building again in a completely fresh build tree and
check the earlier portion of the build log for any errors..

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: RMI Exception

2000-08-09 Thread Archie Cobbs


David Ramirez writes:
 I am having some problems with RMI kaffe-1.0.5 under LINUX, I am always
 getting  the same exception when i run the client side:
 
 java.rmi.UnexpectedException
 
 Does anyone knows how to fix the problem ? or What's going on?
 It is really really important and urgent, I hope you can help me,

You might try version 1.0.6 which was just released.
However, this may not fix the problem as kaffe's RMI
capability is somewhat lacking.

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: Porting Classpath to Kaffe

2000-07-17 Thread Archie Cobbs


Fang Wei Jian writes:
 Have Classpath already been ported to Kaffe? Or this project is in
 progress?

I'm not aware of any project within classpath to do that..
you might check with them directly though.

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: flestmail - daily - 524/525 passed (99.8%) (0 errors, 1 failures)

2000-07-13 Thread Archie Cobbs


 FAIL: CLTestConc.java
java.lang.NullPointerException

Running this test repeatedly for an hour or so I got it to fail again,
this time with a little more info:

  java.lang.NullPointerException
  at java.lang.Class.newInstance(Class.java:native)
  at CLTestConc$CLTestConc_loader.run(CLTestConc.java:155)

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: Nested stack problem

2000-07-12 Thread Archie Cobbs


James writes:
 Ok, I got around the longjmp/setjmp problem w/ Mozilla by building Kaffe
 w/ --with-threads=unix-pthreads.
 
 Things were moving along well when my OJI plugin was a huge monolithic
 function.  Now I am breaking it down so that it intiailizes in the correct
 order (ie., a single JavaVM instance, multiple plugin instances).
 
 The problem is that if I initialize the JVM within a nested function call,
 and then attempt to use the JVM environment from a function that is nested
 less than the call which initialized the JVM, the app segfaults.

This sounds vaguely familiar..

If I understand correctly, the problem is that kaffe uses the thread
inherited from initialization as the first Java thread. Instead, it
should really create a new system thread for the first Java thread,
and then return within the initialization thread.

It might not be too hard to modify kaffe's initialization to do this,
if that in fact would solve your problem.

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: i'm sending some code

2000-06-28 Thread Archie Cobbs


Rizsanyi Zsolt writes:
 this is a fix for the class java.text.Format
 
 The method java.lang.Object parseObject(String) should throw
 ParseException.
 So it should look out like this:
 
 public Object parseObject(String source) throws ParseException{
   ParsePosition pp = new ParsePosition(0);
   Object obj = parseObject(source, pp );
   if (pp.getIndex()==0) throw new ParseException("parseObject failed",0);
   return obj;
 }

Fixed.. thanks!

-Archie

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: About sound support..

2000-06-27 Thread Archie Cobbs


Ganesh Sivaraman writes:
 I have Kaffe running with Swing,JMF and all is well. But then the sound
 support is missing. Can you tell me if Kaffe has the support for it
 What I want is not about Java Sound but support for even a simple
 AuidoClip.
 
 I have posted this message a few times long ago and still havent got any
 reply. Hope this time I am a little lucky..:).

I don't think the lower layer code for audio support has been implemented.
Feel free to give it a shot :-)

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: Thread.stop()

2000-05-22 Thread Archie Cobbs


Jason Baker writes:
 I noticed some inconsistency in Thread.stop(Throwable).  When an
 interruptable thread is stopped, the we get the calling thread's
 stacktrace.  When a thread is asynchronously killed, we get the dying
 thread's stacktrace, but not in the exception stop was passed in.  I
 think we should always get the dying thread's stacktrace.  (Does
 anyone know what the JDK does?)

Email me a simple test case and I'll run it under both kaffe and JDK 1.2.

-AC

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: garbage collecting interfaces

2000-05-22 Thread Archie Cobbs


Timothy Stack writes:
 There seems to be a bug in the destroyClass function when trying to
 garbage collect an interface.  It attempts to get the native code for
 a method, but ends up just dereferencing a null pointer.  The
 following code extends the ClassGC test to include a class that
 implements a dummy interface and a simple fix for destroyClass.
 Unfortunately, I don't know how to verify that the interface was
 actually collected, but atleast it doesn't crash anymore.

Good catch.. thanks, I checked in your patches.

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: Multi-character path separators

2000-05-15 Thread Archie Cobbs


Patrick Doyle writes:
 I noticed a "FIXME" in the Kaffe VM code which I think I have fixed.  It's
 a trivial fix, really, but I suppose someone ought to do it.
 
 The trouble is that this code assumes that the path separator is one
 character long.  This patch simply uses "strstr" instead of "strchr" to
 allow for longer path separators.
 
 I have looked around at all the uses of path_separator, and it appears
 that these are the only two references which need fixing.

Thanks.. patch applied.

-Archie

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: Encoding ISO8859_1?

2000-05-12 Thread Archie Cobbs


Tim Landscheidt writes:
 I'm quite unfamiliar with the Java concept en detail, so
 please forgive my dumbness.
 
   (At least) the latest version of Apache JServ
 (1.1.1b2-dev) gives "AJP Protocol Error:
 java.io.UnsupportedEncodingException: ISO8859_1" when run
 under kaffe 1.0.5 but works fine with Sun's JDK 1.2.2. The
 reasons for this error seem to be:
 
 | src/java/org/apache/jserv/Ajpv12InputStream.java:return new 
String(b,"ISO8859_1");
 | src/java/org/apache/jserv/JServConnection.java:printOut = new 
PrintWriter(new OutputStreamWriter(this.out,"ISO8859_1"));
 
 In URI:http://rufus.w3.org/tools/Kaffe/messages/3548.html,
 a similar problem is depicted and the necessary patch to
 libraries/javalib/kaffe/io/ConverterAlias.java (that I like
 to propose hereby) is pretty obvious. But I'm curious: Is

OK, "ISO8859_1" should be recognized now..

 there any kind of "IANA" for such Java encodings so one
 could tell whether the name for an encoding is "ISO8859_1",
 "ISO-8859-1", "8859_1", "LATIN1", "IBM819" or "CP819" (and
 therefore, who's to blame if an unknown encoding is used)?
 Or can one just invent them?

Don't know what the official list is. Probably another Sun secret.

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: More ksem fun with the beos-native threading system... (fwd)

2000-05-09 Thread Archie Cobbs


Patrick Tullmann writes:
 This would happen if the atomic test+set operations aren't defined or
 aren't actually atomic.  Kaffe falls back on a ?: operator in that
 case...

Maybe kaffe should just #error out the compilation in this case..?

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: fixes for java.util.Vector

2000-05-08 Thread Archie Cobbs


Patrick Tullmann writes:
 Here are some fixes for java.util.Vector so that a Vector can be used
 through the AbstractList interface.  I just added add() and set(),
 which was enough to get an app I'm using to work on Kaffe.  
 
 (I didn't realize how gross Vector had become when they retrofitted
 java.util.AbstractList onto it... most methods are duplicated in the
 new Vector.)

Pat-
I just checked in some Vector changes on Friday.. please
merge your patch in with those (they're much the same).

Thanks,
-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: java.util.Timer?

2000-05-08 Thread Archie Cobbs


Patrick Tullmann writes:
 I have a class that imports javax.swing.* and java.util.*.  It uses a
 class Timer, expecting to get javax.swing.Timer.  When compiling this
 class against Kaffe's Klasses.jar, jikes complains thusly:
 
 Error: Type Timer is imported on demand from package javax/swing and package 
java/util.
 
 What is the class java.util.Timer in Klasses.jar?  I don't see it in
 any of Sun's java documentation, and it only seems to be used by
 'java.util.TimerTask' which is also specific to Kaffe as far as I can
 tell.

java.util.Timer is specified by JDK 1.3...

   http://java.sun.com/j2se/1.3/docs/api/java/util/Timer.html

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: Kaffe Throwable knackered?

2000-04-26 Thread Archie Cobbs


Nic Ferrier writes:
 I've just upgraded GNU-Paperclips (the FSF servlet engine) to Servlet
 API 2.2 which includes a lot more use of Throwable.
 
 I now find that I can't run Paperclips under Kaffe.
 
 It looks like Kaffe's fillInStackTrace() is causing a problem.

What exactly is the problem? Do you have a small program demonstrating
the problem?

Are you using the interpreter?

Thanks,
-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



jMocha benchmark

2000-04-21 Thread Archie Cobbs


FYI-
Interesting Java benchmarking software...

  http://oss.software.ibm.com/developerworks/opensource/jmocha/index.html

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: General question

2000-04-12 Thread Archie Cobbs


Alexandre Oliva writes:
  Is it more advanced than the GPL version? Or is it a stable, thus older, 
  version of the opensourced  version we all have?
 
  No, it's a clean room implementation.
 
  The bottom line being "are they completely different products?".
 
  Yes.
 
 I don't think they're that different, but then, I've never looked at
 the Custom Edition code.  It must not be that difference, since Tim
 imports (part of?) the Custom code into the open version every now and
 then.

Sorry, I thought the question was "are kaffe and the JDK completely
different products".

Yes the GPL and custom editions have much in common.

-Archie

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: General question

2000-04-12 Thread Archie Cobbs


Chris Gray writes:
  The "best" thing for you to do is write your code on your desktop
  with the Sun JDK 1.2 installed. Then when your code is finished
  and you have created your regression tests, compile and run the
  same code on Kaffe (the GPLed version). If the code does not compile
  with Kaffe, post a note to the list describing the problem. If you
  can not fix it yourself, I am sure someone can help you figure
  out how to fix it. If you can fix the problem yourself, then
  fix the bug in Kaffe and send a patch to the list.
 
 You should probably add that what Julien *shouldn't* do is look at the
 Sun JDK sources to see how to fix kaffe.  In fact if he wants to
 contribute to kaffe then he shouldn't look at Sun's sources at all, right?

Right.. if you do, you become "contaminated" :-)

-Archie

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: General question

2000-04-11 Thread Archie Cobbs


Julien Dumesnil writes:
   And in these areas, what's the status of Kaffe? Is it JVM 1.2 compliant?
  
  No, at least not the GPL version. I know that at least java.lang.ref and
  Java2D are missing - somebody more knowledgeable can possibly elaborate
  more on that.
 
 Hum... could you clarify that? Does it mean that there's another version
 of kaffe that is not in the GPL?

Yes.. see http://www.transvirtual.com. They have a "custom edition"
as well.

-Archie

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: General question

2000-04-11 Thread Archie Cobbs


Julien Dumesnil writes:
 Is it more advanced than the GPL version? Or is it a stable, thus older, 
 version of the opensourced  version we all have?
 
 Did they sign some agreement with Sun to port their JVM?

No, it's a clean room implementation.

 The bottom line being "are they completely different products?".

Yes.

 I'm asking this because I'm trying to use Java on a cobalt Raq2 (that's a
 mips machine), and the only thing I could find was Kaffe. (but not
 everything I write compiles correctly - mainly two reasons, I guess, me,
 being not good ;-) and Kaffe, not being completely 1.2 compliant.).
 
 (strangely enough the regression tests don't give me the same errors on my
 desktop PC and on my cobalt... some work on my PC and not on the cobalt
 and vice versa)
 
 So if transvirtual has a more advanced kaffe, then maybe I should just use
 their version instead of fooling around... 

Talk to Transvirtual for more specifics..

-Archie

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: seg fault - core dumped

2000-04-06 Thread Archie Cobbs


Carlyle J. Roberts writes:
 Hi there, I seem to be having problems getting kaffe working. I
  have tried both the 1.0.5 and the cvs snap versions. It seems to
  compile successfully but when I try "make check" each of the tests
  fails and gives a segmentation fault - core dumped.

 I am using FreeBSD - 2.2.7 (which uses aout format so I think
  that prevents me from being able to use the packaged FreeBSD port
  - cause it seems to be elf).

 During compilation I also got some warnings saying that "inter-library
  dependencies are not known to be supported. All declared inter-library
  dependencies are being dropped." Libtool could not satisfy all
  declared inter-library dependencies of modules libnative, libzip,
  libmath, libsecurity. Therefore a static module would be created.

 I did not find anything in the mail list archives that looked
  similar. I also checked to make sure that gcc was using "-g" and
  "O2". I hope that someone can give some help here.

 My system particulars:
 gcc version 2.7.2.1
 gmake 3.78.1
 bash 2.03
 LD_LIBRARY_PATH /usr/lib:/usr/local/lib:/usr/X11R6/lib

I've also seen this problem (Illegal instruction fault) on older
FreeBSD systems but have yet to figure out what is happening.
Most likely it's something to do with kaffe's i386 assembly macros
interacting with GCC.

This problem doesn't occur on FreeBSD 3.4 for example.

-Archie

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: Problem with StringBuffer

2000-04-04 Thread Archie Cobbs


Mo DeJong writes:
 This brings up an interesting question. Should kaffe always
 maintain "compatibility" with a Sun JDK implementation
 (1.1, 1.2, or 1.3) even when a Sun implementation
 is clearly wrong or inefficient?

People seem to complain more about incompatible behavior
than they do about compatible behavior :-)

So I think we should maintain compatibility when we are forced to
(eg, same API's), but not when it's possible to do a better job
without breaking apps that run successfully on the JDK.

-Archie

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: Problem with StringBuffer

2000-04-04 Thread Archie Cobbs


Tatu Saloranta writes:
  
  - most JAVA programmers try to code a program that behaves well
 under all JVMs available.
  - The default StringBuffer implementation from SUN have problems
 with resuse of large Stringbuffers.
  
  So, IMO all you can do is to code around this problem.
 
 I perhaps misunderstood what you were saying first, and you are of
 course
 right in that given that current implementations (I haven't tested IBM's
 jdk to see if it also has the problem, though) have problems, it is
 best to code around the problem (that's what I did once I found the
 problem). What I tried to say was simply that it would be nice to
 fix (or at least alleviate) the potential problem in Kaffe, as it
 seems relatively easy to do (and as the problem has been fixed in
 JDK it seems like it was considered a real implementation deficiency).
 
 Then again as there already is a patch that should save space (even if
 StringBuffer is used just once), I'm a happy camper. :-)

Tatu-
Aside from the theoretical debate, I'd be interested to hear if
the recent checkin's alleviate the problem you're seeing. Patches
are included below in case you don't have the latest CVS.

Thanks,
-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com

--- String.java.origFri Mar 31 15:20:58 2000
+++ String.java Fri Mar 31 15:24:01 2000
@@ -20,11 +20,17 @@
 
 final public class String implements Serializable, Comparable {
 
+   /**
+* Maximum slop (extra unused chars in the char[]) that
+* will be accepted in a StringBuffer - String conversion.
+*/
+   private static final int STRINGBUFFER_SLOP = 32;
+
// Note: value, offset, and count are not private, because
// StringBuffer uses them for faster access
-   char[] value;
-   int offset;
-   int count;
+   char[] value;   // really "final"
+   int offset; // really "final"
+   int count;  // really "final"
int hash;
boolean interned;
 
@@ -51,12 +57,18 @@
 }
 
 public String (StringBuffer sb) {
-
-   // mark this StringBuffer so that it knows we are using it
-   sb.isStringized = true; 
-
-   count = sb.used;
-   value = sb.buffer;
+   synchronized (sb) {
+   if (sb.buffer.length  sb.used + STRINGBUFFER_SLOP) {
+   value = new char[sb.used];
+   count = sb.used;
+   System.arraycopy(sb.buffer, 0, value, 0, count);
+   }
+   else {
+   value = sb.buffer;
+   count = sb.used;
+   sb.isStringized = true;
+   }
+   }
 }
 
 public String( byte[] bytes) {
--- StringBuffer.java.orig  Fri Mar 31 15:20:58 2000
+++ StringBuffer.java   Sat Apr  1 10:03:16 2000
@@ -1,6 +1,3 @@
-package java.lang;
-
-
 /*
  * Java core library component.
  *
@@ -10,13 +7,16 @@
  * See the file "license.terms" for information on usage and redistribution
  * of this file.
  */
-final public class StringBuffer
-  implements java.io.Serializable
-{
-   char[] buffer;
-   int used;
-   boolean isStringized;
-   final private int SPARECAPACITY = 16;
+
+package java.lang;
+
+public final class StringBuffer implements java.io.Serializable {
+   private final int SPARECAPACITY = 16;
+
+   char[] buffer;  // character buffer
+   int used;   // # chars used in buffer
+   boolean isStringized;   // buffer also part of String
+   //  and therefore unmodifiable
 
// This is what Sun's JDK1.1 "serialver java.lang.StringBuffer" says
private static final long serialVersionUID = 3388685877147921107L; 
@@ -26,16 +26,13 @@
 }
 
 public StringBuffer(String str) {
-   if ( str == null)
-   str = String.valueOf( str);
-   used   = str.length();
-   buffer = new char[used+SPARECAPACITY];
-   System.arraycopy(str.toCharArray(), 0, buffer, 0, used);
+   used = str.count;
+   buffer = new char[used + SPARECAPACITY];
+   System.arraycopy(str.value, str.offset, buffer, 0, used);
 }
 
 public StringBuffer(int length) {
-   if (length0) throw new NegativeArraySizeException();
-   buffer=new char[length];
+   buffer = new char[length];
 }
 
 public StringBuffer append(Object obj) {
@@ -44,9 +41,9 @@
 
 public StringBuffer append ( String str ) {
if (str == null) {
-   str = String.valueOf( str);
+   str = "null";
}
-   return (append( str.value, str.offset, str.count));
+   return append(str.value, str.offset, str.count);
 }
 
 public StringBuffer append(boolean b) {
@@ -54,28 +51,22 @@
 }
 
 public sync

Re: Problem with StringBuffer

2000-04-04 Thread Archie Cobbs


Artur Biesiadowski writes:
  // Note: value, offset, and count are not private, because
  // StringBuffer uses them for faster access
  -   char[] value;
  -   int offset;
  -   int count;
  +   char[] value;   // really "final"
  +   int offset; // really "final"
  +   int count;  // really "final"
 
 
 And why these fields are not in fact final ? They are assigned to only
 in constructor so they could be safely marked as final. I don't suppose
 it will make any difference in speed with current jit, but it would be
 selfdocumenting code - plus possibility of catching some bug early
 during String changes/optimalizations.

Does this answer your question? :-)

$ jikes String.java

   332. value = str.value;
---
*** Error: Possible attempt to reassign a value to the final variable "value".


   334. count  = str.count;
---
*** Error: Possible attempt to reassign a value to the final variable "count".

-Archie

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: StringBuffer patch.

2000-04-01 Thread Archie Cobbs


Mo DeJong writes:
 Between revisions 1.11 and 1.12 of
 libraries/javalib/java/lang/StringBuffer.java
 the access of the StringBuffer.ensureCapacity(int)V method was changed
 from public to private.

Oops, my fault -- should be fixed now.

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: Problem with StringBuffer

2000-04-01 Thread Archie Cobbs


Wolfgang Muees writes:
  I finally found out the reason for 'memory leak' on my Java program,
  and the culprit in this case was StringBuffer - implementation.
  
  I have a lexer (made with JFLex), that uses StringBuffer for
  constructing
  the strings for certain tokens. The StringBuffer is reused so that each
  time a new such token is getting creted, StringBuffer.setLength(0) is
  called. However, in Kaffe's implementation at least, the actual length
  of the buffer is not changed. This wouldn't be a big problem in itself,
  as there's just one StringBuffer instance... But, alas, as Strings 
  StringBuffers are optimized so that when new String(StringBuffer) is
  called, the character array is actually shared between the string
  and string buffer, until the StringBuffer needs to change the data
  (or length of the buffer via setLength()). The problem here is that
  as soon as I encounter a long token (~4000 chars in this case),
  _all_ tokens after that will use up the same 4k memory
 
 The right solution for this problem is IMO: don't reuse StringBuffer.
 It is designed primary as an input buffer for a single string.

Yesterday I checked in some changes which should alleviate this
problem nonetheless.. please give them a try and let us know if
they help.

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: Problem with StringBuffer

2000-03-29 Thread Archie Cobbs


Tatu Saloranta writes:
 The same problem occurs in Sun's JDK as well, although by printing
 StringBuffer.capacity() regularly, I noticed that the behaviour is
 not 100% identical. In both cases, though, I end up getting an
 OutOfMemory exception... :-)

Here's a related Sun bug:

 http://developer.java.sun.com/developer/bugParade/bugs/4224987.html

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: JAR files

2000-03-21 Thread Archie Cobbs


Timothy Stack writes:
 I've been working on a small rewrite of the JAR file code in
 kaffe/kaffevm/jar.* and I have some questions.  The new code is mostly
 just a cleanup of the older stuff, the directory entries are read a
 little faster and the entries are stored in a hash table instead of a
 linked list.  The problem I'm having is that I'm trying to cache the
 jarFile objects so that we don't have to reread them constantly, but I
 don't know what the semantics are between the JAR files and the JVM.
 Can the JAR files change while the JVM is running?  And if so, what

I've never heard any specification about handling the case where the
JAR file changes out from under the VM .. hmm, what does the JDK do?
In any case it's probably not a problem either way you do it.

 are we supposed to do?  There are also restrictions because the code
 is used by java.util.ZipFile, so we have to handle generic zip files
 and may not be able to specialize to the JAR files.   Also, if you
 have any thoughts about things you wanted to add I'd appreciate
 your input.

JAR files and ZIP files are the same from the VM's point of view.
The only difference is the existence of META-INF/MANIFEST.MF, which
is ignored by the VM proper.

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: changes to thread locking layer

2000-03-20 Thread Archie Cobbs


Patrick Tullmann writes:
 I've got a large (45K) patch to Kaffe's locking layers.  This patch
 cleans up the separation between the vm-internal locking and the
 thread-specific layer locking.  It makes the 'sem2posixLock' hack a
 first class abstraction (a ksem).  The threading interface's
 requirements for locking are documented and, I think, quite a bit
 simpler.  (I sent out an updated FAQ describing these changes a couple
 of weeks ago).
 
 Since the patch is so large, I didn't include it in this message.  You 
 can fetch it from:
   http://www.cs.utah.edu/~tullmann/ksem-diff.txt,

Patrick-
FYI, these changes are now checked in. Thanks!

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: Kaffe package for Linux Mandrake

2000-03-16 Thread Archie Cobbs


Maurizio DE CECCO writes:
 OK, here are some patches; the patches are merged in a single diff file
 based on the kaffe 1.0.5 source distribution.
 
 Two patches regards the TextComponent and TextField class, and
 fix the textListener, that wasn't called; they apply to the relative
 Java classes.
 
 The third package regard the return status for a Process class,
 but affect a C file; actually, the waitpid function do not
 return the exit status of a process, but a integer coding the 
 exit status and some other information; this integer should be decoded
 using a couple of macros in order to get the real exit status;
 the fix should work on all the POSIX compliant system, but i tryied
 it only on Linux (Mandrake).
 
 Hope this is usefull :-

Thanks- I've checked in a slightly altered version of your jthread.c
patch, and will let Peter Mehlitz take a look at the AWT stuff.

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Swing

2000-03-15 Thread Archie Cobbs


Re: using Swing on kaffe, kaffe currently supports the 1.1.1fcs
version of Swing, but not the 1.2 version.

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: Does Swing work with Kaffe?

2000-03-14 Thread Archie Cobbs


Neumann, Matthew C writes:
 I've gotten kaffe to run a "hello world" app for me, but I'm not having any
 luck getting it to work with Swing.  It looks like it's looking for some
 defaults it can't find; how can I set those explictly so that this'll work?
 
 Simple code:
 ewsh08:.m/kaffe cat HelloWorldAppSwing.java
 import javax.swing.*;
 class HelloWorldAppSwing {
 public static void main (String args[]) {
 JOptionPane.showMessageDialog(null,"Hello World!","hello,
 world", JOptionPane.INFORMATION_MESSAGE);
 }
 }
 
 I'm on an HP-UX v10 OS, BTW.
 
 This is the crash message I get:
 
 ewsh08:.m/kaffe bin/java HelloWorldAppSwing  
 java.lang.IllegalMonitorStateException
 at javax.swing.UIDefaults.get(UIDefaults.java:146)
 at javax.swing.MultiUIDefaults.get(MultiUIDefaults.java:50)

For what it's worth.. I get a different exception with the
current kaffe CVS:

  $ kaffe HelloWorldAppSwing
  warning: running 1.2 version of SwingUtilities
  java.lang.NoSuchMethodError: 
java/awt/Component.getComponentOrientation()Ljava/awt/ComponentOrientation;
  at javax.swing.SwingUtilities.layoutCompoundLabel(SwingUtilities.java:751)
  at 
javax.swing.plaf.basic.BasicGraphicsUtils.getPreferredButtonSize(BasicGraphicsUtils.java:270)
  at 
javax.swing.plaf.basic.BasicButtonUI.getPreferredSize(BasicButtonUI.java:314)
  at 
javax.swing.plaf.basic.BasicButtonUI.getMinimumSize(BasicButtonUI.java:309)
  at javax.swing.JComponent.getMinimumSize(JComponent.java:784)
  at 
javax.swing.plaf.basic.BasicOptionPaneUI.addButtonComponents(BasicOptionPaneUI.java:579)
  at 
javax.swing.plaf.basic.BasicOptionPaneUI.createButtonArea(BasicOptionPaneUI.java:525)
  at 
javax.swing.plaf.basic.BasicOptionPaneUI.installComponents(BasicOptionPaneUI.java:133)
  at 
javax.swing.plaf.basic.BasicOptionPaneUI.installUI(BasicOptionPaneUI.java:95)
  at javax.swing.JComponent.setUI(JComponent.java:253)
  at javax.swing.JOptionPane.setUI(JOptionPane.java:1291)
  at javax.swing.JOptionPane.updateUI(JOptionPane.java:1313)
  at javax.swing.JOptionPane.init(JOptionPane.java:1276)
  at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:627)
  at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:495)
  at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:475)
  at HelloWorldAppSwing.main(HelloWorldAppSwing.java:4)

-Archie

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: [Kaffe] javac compiler shipped with kaffe fails to compile this!

2000-03-13 Thread Archie Cobbs


Mo DeJong writes:
 I just noticed that the javac compiler shipped with Kaffe is badly broken.
 It will not compile the following class. I never noticed this before
 because I always use jikes, but I would like to see Kaffe work
 "out of the box" without forcing the user download jikes. This code
 is perfectly legal, the javac compiler shipped with kaffe incorrectly
 rejects it.
 
 
 abstract class Inherit {
   abstract void foo() throws ClassNotFoundException;
 }
 
 public class InheritOverideException extends Inherit {
   void foo() throws ClassNotFoundException, SecurityException {}
 }
 
 
 Is this the right place to send compiler problem reports?

I forwarded this to Vincent.. the kjc home page is here:

  http://www.dms.at/kopi/kjc.html

-Archie

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: [Kaffe] javac compiler shipped with kaffe fails to compile this!

2000-03-13 Thread Archie Cobbs


Mark Wielaard writes:
  I just noticed that the javac compiler shipped with Kaffe is badly broken.
  It will not compile the following class.
  
  abstract class Inherit {
abstract void foo() throws ClassNotFoundException;
  }
  
  public class InheritOverideException extends Inherit {
void foo() throws ClassNotFoundException, SecurityException {}
  }
 Kaffe seems to come with kjc 1.4B which had this problem.
 It was fixed in kjc1.4C available from http://www.dms.at/kopi/.
 
  Is this the right place to send compiler problem reports?
 Probably the best place to learn about the latest kjc versions would be
 http://www.dms.at/kopi/version.html
 That page also gives the following email adres for reporting bugs
 mailto:[EMAIL PROTECTED]

I just updated kaffe to KJC version 1.4C.

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: kjc update

2000-03-13 Thread Archie Cobbs


Patrick Tullmann writes:
 About the update to KJC 1.4C.  Edouard Parmelan had put some other bug
 fixes into Kaffe's KJC snapshot (i.e., we were running KJC 1.4B++).
 
 See http://rufus.w3.org/tools/Kaffe/messages/5828.html:
  I just commit kjc-1.4B-egp1 in kaffe CVS Tree. This version of kjc
  is also mirrored at http://egp.free.fr/kaffe.
 
 The KJC 1.4C snapshot that just got checked in still has the do-while
 bug that I reported a while ago (see
 http://rufus.w3.org/tools/Kaffe/messages/5820.html).
 
 I don't know which broken version is better.  :)  Hopefully the KJC
 folks will have another official release soon.

OK, so let me know what I should do then (if anything).

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: patch kaffe main.c for 2000

2000-03-10 Thread Archie Cobbs


Alexandre Oliva writes:
  -   fprintf(stderr, "Copyright (c) 1996-1999\nTransvirtual 
Technologies, Inc.  All rights reserved\n");
  +   fprintf(stderr, "Copyright (c) 1996-2000\nTransvirtual 
Technologies, Inc.  All rights reserved\n");
 
 FYI, the FSF lawyer recommends listing all the years in which changes
 have been made, not just an interval, that is ambiguous.  So, he'd
 suggest writing 1996,97,98,99,2000 (yes, omitting the century for
 intermediate years is fine).

I'm no lawyer, but that seems unnecessary.. everything I've ever
seen uses ranges.. there's no ambiguity (unless you're a lawyer I guess).

-Archie

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: Help

2000-03-09 Thread Archie Cobbs


FAROOQ BHATTI writes:
 I am using Redhat 6.0 Box with 2.2.5-15 kernel, I want to use JSP, Servlet,
 JDBC for Oracle using AppacheJserv and Appache web Server.
 
 Since, Redhat 6.0 has comes with Kaffe 1.0b4. So, I want to use it as the JDK
 for my JSP based project.
 
 For that I want to know that is it possible to use Kaffe 1.04b for the JSP
 project if yes, Then please guide me How to configure and confirm its
 installation by describing simple complete scenario of JDBC for Oracle, JSP
 and kaffe.

I don't think you can do that with 1.0b4.  First of all, 1.0b4 is
fairly old and doesn't include the servlet.jar stuff.  But even the
most recent sources don't include any JDBC classes yet.

So it looks like you're stuck using Sun's JDK.

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: Nightly regression tests

2000-03-06 Thread Archie Cobbs


Pavel Roskin writes:
  --disable-debug --with-engine=intrp --with-staticlib --with-staticvm
 
 How about --with-threads=unix-pthreads? But probably FreeBSD doesn't
 support it yet :-(

Because "unix-pthreads" is the wrong name. It should be
called "linux-pthreads" because they are Linux-specific.

It's an open question whether or not if kaffe really did have
a POSIX-compliant pthreads threadsystem it would work under FreeBSD..

-Archie

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: [Kaffe] whatever became of my Class.forName() patches?

2000-02-29 Thread Archie Cobbs


Mo DeJong writes:
 I was just looking over the ChangeLog and I noticed that my
 Class.forName() patches never got added. I seem to remember
 that there was a problem with one of the changes in the patch.
 I am going to repost my patch minus the change that was
 causing problems and see if that is acceptable. Does anyone
 see any problems with the patch in its current form?

I'm committing it now..

Quick question: it appears that kaffe accepts "Ljava/lang/String"
even though you'd think a trailing semi-colon is required.
Is this what JDK does as well (ie, semi-colon is optional at the
end of a string)?

-Archie

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Class.forName() patches

2000-02-29 Thread Archie Cobbs


Mo,

I've applied the following patches -- which are a modification of yours,
and now four tests are failing:

  FAIL: Bean.java
  FAIL: BeanBug.java
  FAIL: Reflect.java
  FAIL: ReflectInvoke.java

Could be my changes but they should be equivalent to yours..
I think the problem may be that kaffe calls classFromSig()
on types that are part of a larger string (and not necessarily
at the end of the string) such as function types.. eg:

  "(Ljava/lang/String;II)V"

Please let me know what you want me to do...

-Archie

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com

Index: classMethod.c
===
RCS file: /cvs/kaffe/kaffe/kaffe/kaffevm/classMethod.c,v
retrieving revision 1.75
diff -u -r1.75 classMethod.c
--- classMethod.c   2000/01/19 11:04:31 1.75
+++ classMethod.c   2000/02/29 19:10:24
@@ -2287,6 +2287,12 @@
 
/* Build signature for array type */
if (CLASS_IS_PRIMITIVE (c)) {
+   /* An array of type void is not allowed */
+   if (strcmp(CLASS_CNAME(c), "void") == 0) {
+   postExceptionMessage(einfo, JAVA_LANG(VerifyError),
+   "invalid array of type void");
+   return (0);
+   }
arr_class = CLASS_ARRAY_CACHE(c);
if (arr_class) {
return (arr_class);
Index: itypes.c
===
RCS file: /cvs/kaffe/kaffe/kaffe/kaffevm/itypes.c,v
retrieving revision 1.17
diff -u -r1.17 itypes.c
--- itypes.c1999/11/29 23:44:10 1.17
+++ itypes.c2000/02/29 19:10:24
@@ -136,24 +136,59 @@
const char* start;
const char* end;
 
+   /* Check for primitive types */
+   switch (**strp) {
+   case 'V':
+   cl = voidClass;
+   break;
+   case 'I':
+   cl = intClass;
+   break;
+   case 'Z':
+   cl = booleanClass;
+   break;
+   case 'S':
+   cl = shortClass;
+   break;
+   case 'B':
+   cl = byteClass;
+   break;
+   case 'C':
+   cl = charClass;
+   break;
+   case 'F':
+   cl = floatClass;
+   break;
+   case 'D':
+   cl = doubleClass;
+   break;
+   case 'J':
+   cl = longClass;
+   break;
+   default:
+   cl = 0;
+   break;
+   }
+   if (cl != 0) {
+   if (*++(*strp) != '\0') {
+   postExceptionMessage(einfo, JAVA_LANG(VerifyError),
+   "extra garbage after primitive type in signature");
+   return (NULL);
+   }
+   return cl;
+   }
+
+   /* Check for non-primitive and array types */
switch (*(*strp)++) {
-   case 'V': return (voidClass);
-   case 'I': return (intClass);
-   case 'Z': return (booleanClass);
-   case 'S': return (shortClass);
-   case 'B': return (byteClass);
-   case 'C': return (charClass);
-   case 'F': return (floatClass);
-   case 'D': return (doubleClass);
-   case 'J': return (longClass);
-   case '[': return (lookupArray(classFromSig(strp, loader, einfo),
- einfo));
+   case '[':
+   return lookupArray(classFromSig(strp, loader, einfo), einfo);
+
case 'L':
start = *strp;
-   for (end = start; *end != 0  *end != ';'; end++)
+   for (end = start; *end != '\0'  *end != ';'; end++)
;
*strp = end;
-   if (*end != 0) {
+   if (*end != '\0') {
(*strp)++;
}
utf8 = utf8ConstNew(start, end - start);
@@ -163,10 +198,17 @@
}
cl = loadClass(utf8, loader, einfo);
utf8ConstRelease(utf8);
+   if (cl != 0  CLASS_IS_PRIMITIVE(cl)) {
+   postExceptionMessage(einfo, JAVA_LANG(VerifyError),
+   "primitive type folllows `L' in signature");
+   cl = NULL;
+   }
return(cl);
+
default:
/* malformed signature */
-   postException(einfo, JAVA_LANG(VerifyError));
+   postExceptionMessage(einfo, JAVA_LANG(VerifyError),
+   "malformed signature");
return (NULL);
}
 }



Re: [Kaffe] whatever became of my Class.forName() patches?

2000-02-29 Thread Archie Cobbs


Mo DeJong writes:
 Nice catch, that should generate an error too. I added a test case
 for this to my forName tests and attached it to this email.
 
 Like so right?
 
 expect("[[Ljava.lang.String",  "Exception"); // need ; at the end of class
 name

OK, I've checked in ArrayForName.java as a new test (that currently
fails) and will wait for Godmar to fix it by checking in his changes
later...

-Archie

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: Kaffe requires -g

2000-02-24 Thread Archie Cobbs


Patrick Tullmann writes:
 Building kaffe requires that the '-g' flag be passed to gcc.
 Otherwise, you get a very broken executable.

Why is that? -g just includes debugging info in a separate section.
The executable code should be the same (eg., strip the -g object
and you get the same object compiled without -g).

But maybe my understanding is too simplified for reality..

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: Test case for the problem in Kaffe

2000-02-24 Thread Archie Cobbs


Alexandre Oliva writes:
  Should I upgrade kaffe then with the latest libtool CVS?
 
 I missed the rest of the conversation (was it in a mailing list whose
 folder I didn't open yet?) but, if that fixes a bug, it's probably a
 good idea.

OK, done..

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: patch for update-class-list

2000-02-23 Thread Archie Cobbs


Patrick Tullmann writes:
 diff -u -u -r1.3 update-class-list
 --- update-class-list 1999/08/06 23:55:36 1.3
 +++ update-class-list 2000/02/23 19:12:34
 @@ -20,7 +20,7 @@
  trap 'rm -f classlist pkglist macrodef; exit 1' 1 2 15
  
  echo WARNING: Omitting java/awt/win32 package from the list of packages
 -find $SRCDIRS -name \*.java -print | sort  classlist
 +find $SRCDIRS -name ".*" -o -name \*.java -print | sort  classlist
  

Don't you mean this?

  find $SRCDIRS -name \*.java -a \! -name ".*" -print | sort  classlist

-Archie

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: kaffe configure bug

2000-02-21 Thread Archie Cobbs


Patrick Tullmann writes:
 This is from an early February Kaffe CVS snapshot.  I haven't upgraded
 (and won't) because I understand that recent libtool changes break
 Kaffe on FreeBSD.

FYI-
I checked in an even later version of libtool that fixes the
FreeBSD problem. However, it caused some other problem on some
other system..

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



IBM Java papers

2000-02-17 Thread Archie Cobbs


FYI-
A recent IBM systems journal was dedicated to Java..

  http://www.research.ibm.com/journal/sj39-1.html

There are a couple of interesting papers describing the IMB JIT
engine and the Jalepeno project which is a JVM written 99% in Java
that bootstraps and JITs itself.

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: Strange things with the current CVS

2000-02-16 Thread Archie Cobbs


Pavel Roskin writes:
 I have updated Kaffe to the current version by "cvs update"
 I'm compiling it on LinuxPCC with the following configuration:

Pavel,

Does "current CVS" include the libtool changes checked in yesterday?
If so, what happens if you use CVS from two days ago? I checked
in some updates to libtool yesterday on Alexandre's advice to fix
a DESTDIR problem on FreeBSD.

Unfortunately, I don't understand much about libtool. But Alexandre
should be able to help out.

-Archie

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: kjc question

2000-02-11 Thread Archie Cobbs


Edouard G. Parmelan writes:
  one difference is that javac and kjc understand line breaks 
  differently. javac is like Tcl in that it will take mac, pc, unix,
  or even a mix in the same file and be ok. kjc barfs on my
  source files unless i filter them first.
 
 Humm, I can't reproduce that.  Which version of kjc did you use ?  Could
 you send me sample class ?

This could be a bug in one of Kaffe's classes, eg, LineNumberReader.
I seem to remember such a bug..

Can you try running KJC under JDK instead and see if there's a difference?

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: DOS drive names

2000-02-08 Thread Archie Cobbs


Marcus G. Daniels writes:
 This isn't suitable as a patch, but here are two places where
 DOS-style pathnames (C:\path\file) aren't handled, and spooky things
 happen as a result...

Probably the correct way to check for absoluteness is to compare
the start of the string against File.listRoots().  By the way,
this function needs to be properly implemented for Windows systems.

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: LOC header signature bad (fix?)

2000-02-04 Thread Archie Cobbs


Roy Wilson writes:
 I noticed an earlier post indicating that the error msg shown in the above
 subject line is caused by a bug in how Kaffe unzips jar files. I didn't see
 a post on how to get around the problem. I have a class library that I can
 use ok w/o unzipping (as expected) and a jar file with documentation in it
 that needs unzipping (but I get the error msg). I can unzip the jar file
 with JDK1.2 on a Win98 machine, but I'd rather not have to transport it
 back to my target Linux box.

Yes it would be great if someone could root out this bug..

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: kaffe/io/ConverterAlias.java and Default

2000-02-03 Thread Archie Cobbs


Marcus G. Daniels writes:
 AC It should match "Default" case-insensitively.. no?  
 
 Ok, I see there is still a name.toUpperCase call in the alias method.
 I must have had .class files out-of-sync, and was jumping to conclusions. 

Yeah, I didn't rebuild Klasses.jar after that change.
Let me know if you find any more problems with it.

-Archie

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: crash loading gcj stuff

2000-02-02 Thread Archie Cobbs


Godmar Back writes:
  So it seems to be something with exception handling.  In the two cases
  below I had to take care to avoid class-lookup failures.  Avoiding
  those failures, the gcj shared object loads and runs fine.
 
 Yes, it sounds so familiar.  Looking for these non-existent classes
 is the first exception kaffe throws and catches when it starts up.  
 It means that no exceptions work.  But see my other mail.

It's probably worth putting a comment in ClassLoader.java right
there, so when people look there scratching their heads because
of some seemingly mysterious problem which is really an
execption-related problem, they understand this.

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: large Class.forName() patch

2000-01-31 Thread Archie Cobbs


Mo DeJong writes:
 Ok, if you have a class named "int" then the JVM should load
 that when you call forName("int"). I am not sure what Kaffe
 would do in this case because it already uses the name "int"
 for the primitive class "I". I think the best way to make
 the regression test check for this is to ensure that
 a loaded class (like "int") is not a primitive type.

So we should fix kaffe internally. It shouldn't use "int" as
an internal name for the integer primitive class, because that
clashes with int.class; instead, let's use "I" like we're supposed
to, and maybe define a macro:

  #define INTEGER_PRIMITIVE_CLASS   "I"

and use INTEGER_PRIMITIVE_CLASS instead of "int".. would this work?

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: large Class.forName() patch

2000-01-31 Thread Archie Cobbs


Jason Baker writes:
#define INTEGER_PRIMITIVE_CLASS   "I"
  
  and use INTEGER_PRIMITIVE_CLASS instead of "int".. would this work?
 
 No, its even worse, since a class in the anonymous package is alot
 more likely to be called "I" than "int".  We can use "I" only where a
 class would be Lpath;.  

Good point.. what about

  #define INTEGER_PRIMITIVE_CLASS   ";I"
  #define BOOLEAN_PRIMITIVE_CLASS   ";Z"

etc.. ?

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: kaffe/io/ConverterAlias.java and Default

2000-01-31 Thread Archie Cobbs


Marcus G. Daniels writes:
 It appears that the "Default" charset alias isn't handled in the right way.
 I see there's a class CharToByteDefault, but the alias method
 forces the name to upper case.  (A result of this is that unicode.tbl
 file isn't located in the right way with Cygwin.)
 
 diff -c -r1.7 ConverterAlias.java
 *** libraries/javalib/kaffe/io/ConverterAlias.java1999/10/25 17:31:26 1.7
 --- libraries/javalib/kaffe/io/ConverterAlias.java2000/01/30 21:34:31
 ***
 *** 47,53 
* @return alias if found, name if not.
*/
   static String alias(String name) {
 ! name = name.toUpperCase();
   String alternate = (String)alias.get(name);
   if (alternate == null) {
   return (name);
 --- 47,54 
* @return alias if found, name if not.
*/
   static String alias(String name) {
 ! if (!name.equals ("Default"))
 ! name = name.toUpperCase();
   String alternate = (String)alias.get(name);
   if (alternate == null) {
   return (name);

I fixed this a slightly different way. Let me know if you have
any problems.

-Archie

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: TestScript ignores exit codes

2000-01-31 Thread Archie Cobbs


Pavel Roskin writes:
 "make check" doesn't detect that some tests return 1 on exit. The code in 
 test/regression/TestScript doesn't work as it should (tested on LinuxPCC,
 bash-2.03).
 
 My modified version uses a much more robust way to detect non-zero exit
 codes. Creating an additional file doesn't seem to slow down the tests.

Thanks! Committed.

-Archie

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: Few bugs patches

2000-01-17 Thread Archie Cobbs


Tatu Saloranta writes:
 I tried to report these bugs via Bug-tracking system at www.kaffe.org,
 but report bounced back for some reason. So, as the bug reports 
 patches
 are rather small, I hope it's ok to send them to the list so someone
 with access can use the patches (after checking they're ok).
 So, here goes:

Sorry, but could you resend your patches in 'diff -u' format?

Thanks,
-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: BUG (small) in java.util.Vector

2000-01-14 Thread Archie Cobbs


jan grant writes:
 Since this class now implements java.util.List, it's worth pointing out
 that
 java.util.Vector doesn't supply an implementation for add (although it
 has the
 functionally identical addElement)

It's implemented in the superclass, AbstractList. Is there a functional
reason we should override it (versus just to do the same as JDK does)?

 It's a trivial fix; what's the state-of-play regarding the 1.2-ness of
 Kaffe's classes?

We try to be 1.2 compliant.. it's mostly true but not completely true.

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: KAFFE_DEBUG problem

2000-01-14 Thread Archie Cobbs


Samuel Sanseri writes:
 I'm having a problem with running Kaffe with KAFFE_DEBUG
 environment variable set to gdb.
 (When KAFFE_DEBUG is not set, the program works just fine.)
 
 
 
 % kaffe HelloWorld
 
 (gdb) run
 Starting program: /local/apps/kaffe-devel/libexec/Kaffe -verify HelloWorld
 Couldn't find or load essential class `java/lang/Object' 
java.lang.NoClassDefFoundError java/lang/Object

Are you setting CLASSPATH in your .cshrc ?
gdb reads that file in before executing a program.

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: File.getAbsolutePath() bugfix

2000-01-13 Thread Archie Cobbs


Mike Linksvayer writes:
  Thanks, fixed!
 
 Argh, please unfix.  I'm an idiot ... the behavior of getAbsolutePath()
 is correct, only getCanonicalPath() is incorrect.  I'll post a real
 fix tonight, after I've tested more thoroughly.

OK, unfixed! :-)

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: AWT library for WinNT

2000-01-12 Thread Archie Cobbs


Edward Llewellyn writes:
 I think I know why I'm getting the error message when trying to run an AWT
 program on 
 WinNT.  Unlike all the other libraries under kaffe-snap/libraries/clib, no
 libawt.la file is generated.
 I see in my /kaffe/lib/kaffe directory libio.la, libmanagement.la,
 libnative.la, and so on,
 one for each subdirectory under clib, but none for awt.  Upon further
 investigation,
 the Makefile for the awt directory doesn't even have a target of libawt.la
 (or any .la for
 that matter).
 
 I'll try modifying the make file to actually make the awt directory's .la
 file.
 
 Is that right?  Is awt for WinNT disabled for some reason?

There might be some problem with "configure" disabling AWT because
it didn't find the right stuff installed on your site.  I would try
to trace the tests in configure.in (search for 'AWT').

-Archie

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: AWT library for WinNT

2000-01-12 Thread Archie Cobbs


Edward Llewellyn writes:
 Well, I started looking into this.  It looks like to have a make file built
 for the win32 directory I need to make 
 a Makefile.am in that directory (I already have), and I need to run
 something called 'automake' to make the
 Makefile.in.  Where do I get automake?  Could someone who has it use the
 enclosed Makefile.am to 
 produce the Makefile.in? Makefile.am 

See FAQ/FAQ.automake for info on where to get it, and see
developers/autogen.sh for how to regenerate all the generated stuff.

You probably also need to install autoconf.

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: Need GetEnv Java 2 invokation function for JVMDI

2000-01-11 Thread Archie Cobbs


Derek L Davies writes:
 I'd like to get some input on the following problem.
 
 To obtain a JVMDI interface pointer the JVMDI spec says a JVMDI client
 should invoke the Java 2 invokation interface function named "GetEnv".
 I've only now realized that Kaffe doesn't do Java 2.  The JVMDI spec
 gives this example:
 
 JVMDI_Interface_1* jvmdi;
 (*jvm)-GetEnv(jvm, jvmdi, JVMDI_VERSION_1);
 
 So, by the letter of the spec, I'm out of luck trying to implement
 JVMDI until we have (at least some of) Java 2.  Or I could call
 back directly into the VM as a crude, ugly AND disfunctional stopgap
 measure.
 
 So, is anyone working on Java 2?  If so, I'd like to work with them.
 Otherwise, I'm thinking it seems not too bad to add GetEnv to the
 invokation interface inside an "#ifdef JNI_VERSION_1_2" block.  From a
 quick glance at the JNI spec it looks like the only new function in
 the Java 2 version of the table is GetEnv and it's been appended to
 the table.  There is also the matter of changing JNI_CreateJavaVM to
 recognize "vm_args.version = 0x00010002;" and how ugly that may or may
 not end up being.  How bad would it be to just return the extra table
 entry regardless of vm_args.version (as long as JNI_VERSION_1_2 is
 defined) until we get full Java 2?

When you say "Java 2" what exactly do you mean? Kaffe has much
of the Java2 platform already implemented, though much is also missing.
In general though, it attempts to be Java2 compatible.

If 'GetEnv' is missing, then we should just add it. There's no
need for #ifdef JNI_VERSION_1_2 or anything (we've never used it
up to now).

-Archie

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: class resolution deadlock

2000-01-06 Thread Archie Cobbs


Patrick Tullmann writes:
 FYI, my patch to fix the deadlock in classMethod.c:resolveString()
 hasn't been applied.  I think folks assume that since I'm at the
 Univ. of Utah, I've got write access to the repository... :)
 
 None of the relevant files have changed, so the old patch should still 
 be good:
   http://rufus.w3.org/tools/Kaffe/messages/5598.html
 
 There's also a regression test:
   http://rufus.w3.org/tools/Kaffe/messages/5586.html

Pat-
I inquired to Godmar about this because he's a more appropriate
person to review it and check it in, but I didn't hear anything
back, so I'll go ahead and check it in.

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: BufferedInputReader

1999-12-21 Thread Archie Cobbs


Kero van Gelder writes:
 I encountered a small problem using the BufferedInputStream.
 When telling it to skip a big number of bytes, it stops at the first
 2k boundary (or, more precisely, from position 32 to skip 37919 bytes
 lets it stop at position 2048).
 
 Removing the BufferedInputStream and using only the
 ByteArrayInputStream that is underneath works.
 
 The funny thing is that sun/blackdown:
 $ java -version
 java version "1.2"
 Classic VM (build Linux_JDK_1.2_pre-release-v2, native threads, sunwjit)
 
 has _exactly_ the same problem, where _exactly_ the same solution worked.
 I don't want to be rude, but who is stealing code from whom?

This is not a bug.  The skip() method as defined in FilterInputStream
is not required to skip the number of bytes requested.

Ref: 
http://java.sun.com/products/jdk/1.2/docs/api/java/io/BufferedInputStream.html#skip(long)

No code was stolen :-) Kaffe tries to behave like JDK whenever possible
and in this case is just using the same default buffer size (eg., 2048).

Presumably, JDK and kaffe use the same (obvious) skip() algorithm,
i.e., skip remaining buffered data first.

-Archie

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: install errors

1999-12-15 Thread Archie Cobbs


Patrick Tullmann writes:
  What do you mean when the tree is clean? You can't install
  from a clean tree because there's nothing to install... ?
 
 'make clean all install' works.  (I meant the tree got cleaned
 immediately before an all install.)  If I don't clean the
 libraries/clib/ directory before doing a 'make all install', I get the
 error.

Try completely blowing away your build directory hierarchy
and starting over.. this is what I do, because of basic
configure/libtool/automake paranoia.

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



Re: install errors

1999-12-14 Thread Archie Cobbs


Patrick Tullmann writes:
  How fresh is that? 
 
 About 1 hour old

Snapshot or CVS update?  They are different I think.

  But you may have to remove all .la files in your build tree before
  his change takes effect.
 
 If I do a 'make clean', then install works just fine.  However, if I
 change anything and rerun 'make install' I get the error.  Its most
 definetly the quotes being stripped off the regexp (sh -x told me so).

You're Makefile's should have e.g. the patch below.

If this doesn't fix it for you, then there's some other problem.

-Archie

___
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com

Index: libraries/clib/native/Makefile.am
===
RCS file: /cvs/kaffe/kaffe/libraries/clib/native/Makefile.am,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- Makefile.am 1999/10/09 19:56:40 1.14
+++ Makefile.am 1999/12/09 21:38:57 1.15
@@ -49,7 +49,7 @@
 UTIL_SRCS = \
Arrays.c
 
-libnative_la_LDFLAGS = $(KLIBFLAGS) -module -release $(KVER) -export-symbols-regex 
"^([Jj]ava|kaffe)_"
+libnative_la_LDFLAGS = $(KLIBFLAGS) -module -release $(KVER) -export-symbols-regex 
+'^\([Jj]ava\|kaffe\)_'
 libnative_la_LIBADD = $(M_LIBS)
 libnative_la_SOURCES = $(IO_SRCS) $(LANG_SRCS) $(REFLECT_SRCS) $(TEXT_SRCS) 
$(TEST_SRCS) $(UTIL_SRCS)
 



Re: install errors

1999-12-14 Thread Archie Cobbs


Patrick Tullmann writes:
  If this doesn't fix it for you, then there's some other problem.
 
 I think there is.  If the tree is 'clean', then I get an install
 command line that contains:
   ... -export-symbols-regex ^\([Jj]ava\|kaffe\)_ ...
 if its dirty then I get a command without the '\' in it:
   ... -export-symbols-regex ^([Jj]ava|kaffe)_ ...
 
 That's really bizarre.  I build into a separate tree from the source.
 I can't think of anything else that might be relevant about my setup.
 Let me know if you want more info from my setup...

What do you mean when the tree is clean? You can't install
from a clean tree because there's nothing to install... ?

I build in a separate tree as well by the way... generally
by doing configure, then saying "gmake" then "gmake install".

-Archie

_______
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



  1   2   >