[kaffe] Reproducible bugs running Freenet under Kaffe

Matthew Toseland toad at amphibian.dyndns.org
Thu Oct 24 10:16:26 PDT 2002


On Thu, Oct 24, 2002 at 04:52:52PM +0200, Oskar Sandberg wrote:
> On Thu, Oct 24, 2002 at 03:18:41PM +0100, Matthew Toseland wrote:
> > Ok, I've got CVS working now, and I get a NullPointerException,
> > reliably, in java.lang.Class.getResourceAsStream. Attached.
> 
> Class.java throws an NPE if getResourceAsStream is run for a resource
> that does not exist. This is obviously when looking at the code. I've
> attached a (trivial) patch.
I still get
kaffe-bin: exception.c:398: dispatchException: Assertion
`!intsDisabled()' failed.

With either jikes or the javac from the IBM JDK.

This can be produced reliably by running slightly patched freenet on my
datastore... I can send you these things if you need them, but the
datastore is a gig.
> 
> -- 
> 
> Oskar Sandberg
> oskar at freenetproject.org

> Index: libraries/javalib/java/lang/Class.java
> ===================================================================
> RCS file: /cvs/kaffe/kaffe/libraries/javalib/java/lang/Class.java,v
> retrieving revision 1.37
> diff -c -r1.37 Class.java
> *** libraries/javalib/java/lang/Class.java	4 Sep 2002 16:08:13 -0000	1.37
> --- libraries/javalib/java/lang/Class.java	24 Oct 2002 14:48:50 -0000
> ***************
> *** 367,373 ****
>    */
>   public InputStream getResourceAsStream(String name) {
>     	try {
> !   		return (getResource(name).openStream());
>     	}
>     	catch (IOException e) {
>     		return null;
> --- 367,374 ----
>    */
>   public InputStream getResourceAsStream(String name) {
>     	try {
> !             URL res = getResource(name);
> !             return (res == null ? null : res.openStream());
>     	}
>     	catch (IOException e) {
>     		return null;


-- 
Matthew Toseland
toad at amphibian.dyndns.org
amphibian at users.sourceforge.net
Freenet/Coldstore open source hacker.
Employed full time by Freenet Project Inc. from 11/9/02 to 11/11/02.
http://freenetproject.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://kaffe.org/pipermail/kaffe/attachments/20021024/b473ba70/attachment-0003.pgp 


More information about the kaffe mailing list