libgcj 4.3.0 as well as 3.4.3 and probably everything inbetween will get OOM on
this simple program when run on glibc based systems:
---------->8------------------
import java.io.UnsupportedEncodingException;
public class TextProb
{
public static void main(String[] args)
{
try {
byte[] txt = new byte[] { -55, 87, -55, -42, -55, -20 };
String s = new String(txt, 0, 6, "MS932");
System.out.println(s);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
}
}
---------------->8------------------------
I am testing a patch
--
Summary: OutOfMemoryError on simple text conversion.
Product: gcc
Version: 4.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgcj
AssignedTo: daney at gcc dot gnu dot org
ReportedBy: daney at gcc dot gnu dot org
GCC build triplet: x86_64-pc-linux-gnu
GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36252