java/5134: bug in gnu.gcj.runtime.StringBuffer

olivier@zipworld.com.au olivier@zipworld.com.au
Sun Dec 16 13:57:00 GMT 2001


>Number:         5134
>Category:       java
>Synopsis:       bug in gnu.gcj.runtime.StringBuffer
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 16 13:46:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     olivier@zipworld.com.au
>Release:        gcc version 3.1 20011211 (experimental)
>Organization:
>Environment:
Reading specs from /usr/local/gcc/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs
Configured with: ../../program/cvs/gcc/configure --prefix=/usr/local/gcc --enable-shared --enable-threads=posix --enable-languages=c++,java
Thread model: posix
gcc version 3.1 20011211 (experimental)
>Description:
gcj does not handle correctly the concatenation of two 
String in some cases (see attached example).
gcj calls a gnu.gcj.runtime.StringBuffer and then throws
an .ArrayIndexOutOfBoundsException!!!
This seems to happen only when the two String exceed 34
characters. With one less character, the example code
works.
>How-To-Repeat:
gcj --main=A A.java
./a.out
>Fix:
Unknown...
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="A.java"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="A.java"

cHVibGljIGNsYXNzIEEgCnsKICAgcHVibGljIHN0YXRpYyB2b2lkIG1haW4oU3RyaW5nW10gYXJn
cykgCiAgIHsKICAgICAgU3RyaW5nIGEgPSAiMDEiOwogICAgICBTdHJpbmcgYiA9ICIyMzQ1Njc4
OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQiOwogICAgICBhID0gYSArIGI7CiAgICAgIFN5c3Rl
bS5vdXQucHJpbnRsbihhKTsKICAgfQp9Cg==



More information about the Gcc-bugs mailing list