[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#91935: marked as done (iconv charset problems)



Your message dated Mon, 23 Apr 2007 10:47:07 +0000
with message-id <E1Hfw4Z-0002j3-Eu@ries.debian.org>
and subject line Bug#91935: fixed in glibc 2.5-4
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: libc6
Version: 2.2.2-1
Severity: normal

info libc claims that any combination of charsets in "iconv --list"
should work. That does not seem to be the case.  Furthermore, even some
charset combos that can be iconv_opened lead to segfaults or assertionsin
the loaded converters.

Charsets with conversion errors:

CP939
CSIBM932
CSIBM939
CSIBM943
CSISO2022JP2
IBM-932
IBM-939
IBM-943
IBM932
IBM939
IBM943

Charsets that refuse iconv_open:

10646-1:1993
10646-1:1993/UCS4
E13B
ISO-10646/UCS2
ISO-10646/UCS4
ISO-10646/UTF-8
ISO-10646/UTF8
ISO-2022-CN-EXT
ISO-2022-JP-2
ISO_5427:1981
ISO_5428:1980
ISO_646.IRV:1991
ISO_6937-2:1983
ISO_6937:1992
ISO_8859-10:1992
ISO_8859-14:1998
ISO_8859-15:1998
ISO_8859-1:1987
ISO_8859-2:1987
ISO_8859-3:1988
ISO_8859-4:1988
ISO_8859-5:1988
ISO_8859-6:1987
ISO_8859-7:1987
ISO_8859-8:1988
ISO_8859-9:1989
NC_NC00-10:81

Here is a test program to demonstrate some of these problems. To use it,
first execute this:

iconv --list | grep ^' ' | tr ' ,' '\n' | env - sort -u | \
	tail -n +2 > iconv.out.s

This simply gives a file listing all supported charsets.

Then try this program. (It will abort at the first problem, so you can
comment out a charset with "#".)


#include <iconv.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

void report(const char *what, int who, const char *when)
{
	fprintf(stderr, "ictest: %s: %s:%d: %s\n", what, __FILE__, who, when);
	perror("errno");
	abort();
}
#define CHECK(cond) do { if (!(cond)) report(#cond, __LINE__, ""); } while(0)
#define CHECKI(cond, info) do { if (!(cond)) report(#cond, __LINE__, info); } while(0)

FILE *charsets;

FILE *out;

wchar_t w;

char cs[8192];
char buf[819200];
char outbuf[819200];

iconv_t ic;

int main(int argc, char *argv[])
{
	CHECK((charsets = fopen("iconv.out.s", "r")) != NULL);
	while (fgets(cs, sizeof(cs)-2, charsets)) {
		char *p;
		char *bp, *op;
		int bl, ol;
		int c;

		p = cs;
		while (*p && *p != '\n') p++;
		*p = '\0';
		if (cs[0] == '#') {
			printf("Skipping %s\n", cs);
		}
		else {
			printf("Processing %s\n", cs);

			CHECKI((ic = iconv_open(cs, "WCHAR_T")) != (iconv_t)-1, cs);
			sprintf(buf, "%s.tab1", cs);
			CHECKI((out = fopen(buf, "w")), cs);
			op = outbuf;
			ol = sizeof(outbuf);
			for (c=0; c<100000; c++) {
				w = c;
				bp = (void *)&w;
				bl = sizeof(w);
				CHECKI(iconv(ic, &bp, &bl, &op, &ol) >= 0, cs);
			}
			CHECKI(fwrite(outbuf, 1, op-outbuf, out) == op-outbuf, cs);
			CHECKI(fclose(out) == 0, cs);
			CHECKI(iconv_close(ic) == 0, cs);

			CHECKI((ic = iconv_open("WCHAR_T", cs)) != (iconv_t)-1, cs);
			sprintf(buf, "%s.tab2", cs);
			CHECKI((out = fopen(buf, "w")), cs);
			bp = outbuf;
			bl = op-bp;
			op = buf;
			ol = sizeof(buf);
			CHECKI(iconv(ic, &bp, &bl, &op, &ol) >= 0, cs);
			CHECKI(fwrite(buf, 1, op-buf, out) == op-buf, cs);
			CHECKI(fclose(out) == 0, cs);
			CHECKI(iconv_close(ic) == 0, cs);

			
			CHECKI((ic = iconv_open(cs, "ASCII")) != (iconv_t)-1, cs);
			sprintf(buf, "%s.tag", cs);
			CHECKI((out = fopen(buf, "w")), cs);
			sprintf(buf, "charset \"%s\";\n", cs);
			bp = buf;
			bl = strlen(buf);
			op = outbuf;
			ol = sizeof(outbuf);
			CHECKI(iconv(ic, &bp, &bl, &op, &ol) >= 0, cs);
			CHECKI(fwrite(outbuf, 1, op-outbuf, out) == op-outbuf, cs);
			CHECKI(fclose(out) == 0, cs);
			CHECKI(iconv_close(ic) == 0, cs);

		}
	}
	CHECK(ferror(charsets) == 0);
	CHECK(fclose(charsets) == 0);
	return 0;
}


-- System Information
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux khms.westfalen.de 2.2.18-kai.44 #1 Sat Jan 27 22:28:29 CET 2001 i586



--- End Message ---
--- Begin Message ---
Source: glibc
Source-Version: 2.5-4

We believe that the bug you reported is fixed in the latest version of
glibc, which is due to be installed in the Debian FTP archive:

glibc-doc_2.5-4_all.deb
  to pool/main/g/glibc/glibc-doc_2.5-4_all.deb
glibc_2.5-4.diff.gz
  to pool/main/g/glibc/glibc_2.5-4.diff.gz
glibc_2.5-4.dsc
  to pool/main/g/glibc/glibc_2.5-4.dsc
libc6-dbg_2.5-4_amd64.deb
  to pool/main/g/glibc/libc6-dbg_2.5-4_amd64.deb
libc6-dev-i386_2.5-4_amd64.deb
  to pool/main/g/glibc/libc6-dev-i386_2.5-4_amd64.deb
libc6-dev_2.5-4_amd64.deb
  to pool/main/g/glibc/libc6-dev_2.5-4_amd64.deb
libc6-i386_2.5-4_amd64.deb
  to pool/main/g/glibc/libc6-i386_2.5-4_amd64.deb
libc6-pic_2.5-4_amd64.deb
  to pool/main/g/glibc/libc6-pic_2.5-4_amd64.deb
libc6-prof_2.5-4_amd64.deb
  to pool/main/g/glibc/libc6-prof_2.5-4_amd64.deb
libc6-udeb_2.5-4_amd64.udeb
  to pool/main/g/glibc/libc6-udeb_2.5-4_amd64.udeb
libc6_2.5-4_amd64.deb
  to pool/main/g/glibc/libc6_2.5-4_amd64.deb
libnss-dns-udeb_2.5-4_amd64.udeb
  to pool/main/g/glibc/libnss-dns-udeb_2.5-4_amd64.udeb
libnss-files-udeb_2.5-4_amd64.udeb
  to pool/main/g/glibc/libnss-files-udeb_2.5-4_amd64.udeb
locales-all_2.5-4_amd64.deb
  to pool/main/g/glibc/locales-all_2.5-4_amd64.deb
locales_2.5-4_all.deb
  to pool/main/g/glibc/locales_2.5-4_all.deb
nscd_2.5-4_amd64.deb
  to pool/main/g/glibc/nscd_2.5-4_amd64.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 91935@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Aurelien Jarno <aurel32@debian.org> (supplier of updated glibc package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon, 23 Apr 2007 11:41:18 +0200
Source: glibc
Binary: libc0.1-prof libc6-dev-amd64 locales-all libc6-i686 libc6-dev-ppc64 libc0.3-pic glibc-doc libc0.3 libc0.1-i686 libc0.1-i386 libc6.1-dev libc6-s390x libnss-files-udeb libc0.1-dev-i386 libc6-dev-sparc64 libc6-i386 libc0.3-dev libc6-udeb libc6-dbg libc6.1-pic libc6-dev libc0.3-prof libc6-sparcv9 libc0.1-udeb libc6-dev-i386 libc6.1-prof libc0.1-dev locales libc6-pic libc0.3-udeb libc6-dev-powerpc libc0.1-pic libc6-ppc64 libc0.3-dbg libc0.1-dbg libc6-amd64 libc0.1 libc6-prof libc6-xen libc6-powerpc libc6 libc6-sparcv9b libc6.1-udeb libc6.1-dbg nscd libc6-sparc64 libnss-dns-udeb libc6.1 libc6-dev-s390x
Architecture: source amd64 all
Version: 2.5-4
Distribution: unstable
Urgency: low
Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
Changed-By: Aurelien Jarno <aurel32@debian.org>
Description: 
 glibc-doc  - GNU C Library: Documentation
 libc6      - GNU C Library: Shared libraries
 libc6-dbg  - GNU C Library: Libraries with debugging symbols
 libc6-dev  - GNU C Library: Development Libraries and Header Files
 libc6-dev-i386 - GNU C Library: 32bit development libraries for AMD64
 libc6-i386 - GNU C Library: 32bit shared libraries for AMD64
 libc6-pic  - GNU C Library: PIC archive library
 libc6-prof - GNU C Library: Profiling Libraries
 libc6-udeb - GNU C Library: Shared libraries - udeb (udeb)
 libnss-dns-udeb - GNU C Library: NSS helper for DNS - udeb (udeb)
 libnss-files-udeb - GNU C Library: NSS helper for files - udeb (udeb)
 locales    - GNU C Library: National Language (locale) data [support]
 locales-all - GNU C Library: Precompiled locale data
 nscd       - GNU C Library: Name Service Cache Daemon
Closes: 91935 239427 263494 340911 341903 354292 378191 413989 419225 420188 420420 420552
Changes: 
 glibc (2.5-4) unstable; urgency=low
 .
   * debian/rules.d/build.mk: fix the testsuite workaround on the MIPS SB1
     platform.
   * debian/locales-all.README.Debian: Remove again, it is useless now.
     (Closes: #378191)
   * debhelper.in/libc.preinst: use dpkg-query instead of looking into
     /var/lib/dpkg/info. Thanks to Guillem Jover for the hint.
   * patches/mips/cvs-ldsodefs_h.diff: new patch (correct multiple
     inclusion guard in sysdeps/mips/ldsodefs.h) from CVS.
   * patches/any/cvs-printf_fp-c.diff: update patch from CVS (fix exponent
     -4 special case handling when wcp == wstartp + 1).  Closes: #419225.
   * patches/any/cvs-bits_in_h-ipv6.diff: new patch from CVS (defines
     IPV6_V6ONLY in bits/in.h).  Closes: #420188.
   * debhelper.in/libc.preinst: check the library files instead of links
     while checking for a non-dpkg owned libc6 in /lib/tls. Links are
     recreated by ldconfig.
   * patches/any/cvs-realpath.diff: new patch (fix wrong comment about
     realpath() in /usr/include/stdlib) from CVS.  Closes: #239427.
   * debian/local/manpages/iconv.1: mention that -t is optional.  Closes:
     #354292.
   * debian/local/manpages/iconv.1: mention that multiple fils could be
     specified on the command line.  Closes: #340911.
   * debian/patches/any/submitted-strfry.diff: new patch (fix strfry()
     distribution) by Steinar H. Gunderson.  Closes: #341903.
   * patches/all/submitted-iconv-E13B.diff: new patch to fix wrong E13B
     charset alias. patches/any/submitted-iconv-colon.diff: new patch to
     allow colons in charset names.  Closes: #91935.
   * New Hungarian debconf translation, by Attila Szervác.  Closes: #420420.
   * debian/patches/any/local-ldd.diff: update to discard the error message
     that appears if one of the dynamic loader is not supported by the
     kernel.  Closes: #263494.
   * debian/patches/arm/cvs-check_pf.c: new patch (fix assertion in
     check_pf.c) from CVS.  Closes: #420552.
   * debian/debhelper.in/glibc-doc.links: add missing manpages links for
     functions documented with others.  Closes: #413989.
Files: 
 05b61401d670323a20e22ded105dbb32 2253 libs required glibc_2.5-4.dsc
 36520c1a970227ded17ae6e50827ac0b 1118086 libs required glibc_2.5-4.diff.gz
 9b3d94d9fe5cd85d68b8fe57d53cb93b 1604978 doc optional glibc-doc_2.5-4_all.deb
 e70eee4ee1d0431cd78680b7eac733e3 4032548 libs standard locales_2.5-4_all.deb
 eb75ccfa71f573a4c1f72d82a41a659b 4739610 libs required libc6_2.5-4_amd64.deb
 11b194f60cdf21595bee23436492be1d 2459336 libdevel optional libc6-dev_2.5-4_amd64.deb
 059012b126ef5ba200db5375a6b6a371 1903560 libdevel extra libc6-prof_2.5-4_amd64.deb
 280b28099f4b2d37974537518068aaed 1448738 libdevel optional libc6-pic_2.5-4_amd64.deb
 9abebbf859c4626cd5e93770fd099594 1658916 libs extra locales-all_2.5-4_amd64.deb
 9c4492e0735670e2c5b9432c3dbf916f 3560824 libs optional libc6-i386_2.5-4_amd64.deb
 d4e058ae4e0b861a9d430f956b1b7627 1842996 libdevel optional libc6-dev-i386_2.5-4_amd64.deb
 b5c62ac07fec7e7ef0c7a62d04a0df7c 155228 admin optional nscd_2.5-4_amd64.deb
 9caa840a90ad826e9970f02410937222 5014618 libdevel extra libc6-dbg_2.5-4_amd64.deb
 83090532e4365cbc7f7031cc6f84d11a 1079472 debian-installer extra libc6-udeb_2.5-4_amd64.udeb
 207324f1b6bb23dd611fc9d3f4ea2771 9548 debian-installer extra libnss-dns-udeb_2.5-4_amd64.udeb
 92a61582e0fd4f6aee29a7f4f51010c9 17258 debian-installer extra libnss-files-udeb_2.5-4_amd64.udeb
Package-Type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGLIkcw3ao2vG823MRAqWhAJ9dTa7CQ+3PQi6b5J3MCTRjyjDRGgCdEUL5
1LTMbjKfNIFauqP4mB0CcPA=
=L7Os
-----END PGP SIGNATURE-----


--- End Message ---

Reply to: