[kaffe] kaffe.io.ByteToCharIconv may go in to an endless loop

Ito Kazumitsu ito.kazumitsu at hitachi-cable.co.jp
Tue Nov 19 06:24:13 PST 2002


I found a problem which seems to have something to do with
kaffe.io.ByteToCharIconv.

The attached program never stops when run under certain conditions.
The common thing among such abnormal cases is that kaffe.io.ByteToCharIconv
must be used to convert the bytes into characters.

I am sorry I am sending big test data,  but this problem deeply
depends on the data and it is not easy to make the test data compact.

$ cat Test.java
import java.io.*;
public class Test {
    public static void main(String[] args) {
        try {
            char[] buf = new char[16384];
            Reader rdr = new InputStreamReader(
                new FileInputStream(args[0]), args[1]);
            rdr.read(buf,0,buf.length);
            System.out.println("OK");
        }
        catch (Exception e) {
            e.printStackTrace();
        }
    }
}
$ java Test test1-EUC EUC_JP
OK
$ java Test test1-UTF8 UTF8
OK
$ java Test test1-SJIS SHIFT_JIS
^C
$ java Test test1-ISO-2022-JP ISO-2022-JP
^C

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test1.tar.gz
Type: application/octet-stream
Size: 94681 bytes
Desc: not available
Url : http://kaffe.org/pipermail/kaffe/attachments/20021119/16371f2e/attachment-0003.obj 


More information about the kaffe mailing list