[kaffe] CharToByteIconv dumps core when used for SHIFT_JIS
Ito Kazumitsu
ito.kazumitsu@hitachi-cable.co.jp
Tue Apr 29 04:16:02 2003
In message "[kaffe] CharToByteIconv dumps core when used for SHIFT_JIS"
on 03/04/28, Ito Kazumitsu <ito.kazumitsu@hitachi-cable.co.jp> writes:
> I found a case where CharToByteIconv dumps core when used for SHIFT_JIS.
This problem occurs not only with SHIFT_JIS but also with a number of
charsets. When kaffe dumps core, the following message is displayed:
kaffe-bin: mem/gc-incremental.c:865: gcMalloc: Assertion `fidx < nrTypes && size != 0' failed.
Test results for various charsets are as follows.
ASCII PASS
ISO-8859-1 PASS
ISO-8859-2 PASS
ISO-8859-3 PASS
ISO-8859-4 PASS
ISO-8859-5 PASS
ISO-8859-7 PASS
ISO-8859-9 PASS
ISO-8859-10 FAIL
ISO-8859-13 FAIL
ISO-8859-14 FAIL
ISO-8859-15 FAIL
ISO-8859-16 FAIL
KOI8-R PASS
KOI8-U FAIL
KOI8-RU FAIL
CP1250 PASS
CP1251 PASS
CP1252 PASS
CP1253 PASS
CP1254 PASS
CP1257 PASS
CP850 PASS
CP866 PASS
MacRoman FAIL
MacCentralEurope FAIL
MacIceland FAIL
MacCroatian FAIL
MacRomania FAIL
MacCyrillic FAIL
MacUkraine FAIL
MacGreek FAIL
MacTurkish FAIL
Macintosh FAIL
ISO-8859-6 PASS
ISO-8859-8 PASS
CP1255 PASS
CP1256 PASS
CP862 PASS
MacHebrew FAIL
MacArabic FAIL
EUC-JP PASS
SHIFT_JIS FAIL
CP932 FAIL
ISO-2022-JP FAIL
ISO-2022-JP-2 FAIL
ISO-2022-JP-1 FAIL
EUC-CN FAIL
HZ FAIL
GBK FAIL
GB18030 FAIL
EUC-TW FAIL
BIG5 FAIL
CP950 FAIL
BIG5-HKSCS FAIL
ISO-2022-CN FAIL
ISO-2022-CN-EXT FAIL
EUC-KR FAIL
CP949 FAIL
ISO-2022-KR FAIL
JOHAB FAIL
ARMSCII-8 FAIL
Georgian-Academy FAIL
Georgian-PS FAIL
KOI8-T FAIL
TIS-620 FAIL
CP874 FAIL
MacThai FAIL
MuleLao-1 FAIL
CP1133 FAIL
VISCII FAIL
TCVN FAIL
CP1258 PASS
HP-ROMAN8 FAIL
NEXTSTEP FAIL
UTF-8 PASS
UCS-2 FAIL
UCS-2BE FAIL
UCS-2LE FAIL
UCS-4 FAIL
UCS-4BE FAIL
UCS-4LE FAIL
UTF-16 FAIL
UTF-16BE FAIL
UTF-16LE FAIL
UTF-32 FAIL
UTF-32BE FAIL
UTF-32LE FAIL
UTF-7 FAIL
C99 FAIL
JAVA FAIL
Test Program
public class IconvEmptyString {
public static void main(String[] args) throws Exception {
"".getBytes(args[0]);
}
}
Shell script for running the test program
rm -f core
list=`ruby listcharset.rb libiconv/libiconv-1.8/README`
for i in $list
do
java IconvEmptyString $i
if [ -f core ]
then
rm core
echo "$i FAIL"
else
echo "$i PASS"
fi
done
where ruby listcharset.rb is a program that picks up charset
names from libiconv-1.8/README.