[Bug libgcj/49314] md5test, shatest output FAILs on Tru64 UNIX

ro at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jun 16 17:00:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49314

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aph at gcc dot gnu.org,
                   |                            |tromey at gcc dot gnu.org
   Target Milestone|---                         |4.7.0

--- Comment #1 from Rainer Orth <ro at gcc dot gnu.org> 2011-06-16 16:59:31 UTC ---
After some further debugging, I could reproduce the issue with the following
testcase:

class arraycopy {
    public static void main(String[] argv) {
        String src = "a";
        byte dst[] = new byte[64];

        System.arraycopy (src.getBytes(), 0, dst, 0, src.length());
    }
}

With some debug code in java/lang/natSystem.cc (java::lang::System::arraycopy),
I get

arraycopy: src_offset = 0 src_a->length = 0
           dst_offset = 0 dst_a->length = 64
           count = 1
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
   at java.lang.System.arraycopy(Unknown Source)
   at arraycopy.main(Unknown Source)

I haven't yet found where src_a->length is supposed to be initialized.  Any
suggestions?

  Rainer



More information about the Gcc-bugs mailing list