[kaffe] SPEC JVM98 Failure with current CVS Sources
Helmer Krämer
hkraemer at freenet.de
Thu Oct 3 13:04:42 PDT 2002
On Thu, 3 Oct 2002 11:55:00 -0700 (PDT)
Dalibor Topic <robilad at yahoo.com> wrote:
> Hi Kevin,
>
> --- "Kevin D. Kissell" <kevink at mips.com> wrote:
> > The new build from CVS (with my MIPS patch)
> > passes all the regression tests, including the new
> > CatchLimits.class.save test, but it fails the SPEC
> > JVM98 _200_check sanity check, on the
> > testObjectArray test, blowing out with:
> >
> > java.lang.ArrayStoreException: not arrays
> >
> > This arose from an invocation of
> > java.lang.system.arraycopy() by the SPEC code.
> > I'd provide the whole exception backtrace, but
> > the applet console window doesn't allow me to
> > cut and paste to an Xterm. :-( I hope that this
> > clue would be enough to tell someone who had
> > made relevant mods between 1.0.7 and today
> > where they should re-check their work.
>
> It was me who made the modification. I merged in the
> pure java System.arraycopy from pocketlinux as it was
> pure java and faster on small cases than the native
> method invocation. It made a noticeable difference on
> the SciMark benchmark.
>
> In the new code, instanceof destination array is used
> to check the type of the array, and call the according
> copy loop. I assume that we are mishandling the case
> where destination is null, and the check fails for all
> types.
>
> Could you confirm that by replacing the throw clause
> by a few System.err.println calls with dst and src in
> libraries/javalib/java/lang/System.java in method
> arraycopy?
I guess the problem is that System.arraycopy
doesn't verify that dst and src are both !=
null before figuring out how to copy the array.
According to the api spec, System.arraycopy is
supposed to throw a NullPointerException when
either src or dst are null, so something like
the attached patch should make kaffe pass the
test.
Greetings,
Helmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: java-lang-system.patch
Type: application/octet-stream
Size: 674 bytes
Desc: not available
Url : http://kaffe.org/pipermail/kaffe/attachments/20021003/64151206/attachment-0003.obj
More information about the kaffe
mailing list