--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: "apt-cache search" abort if locale is ja_JP.eucJP.
- From: Kusanagi Kouichi <slash@ma.neweb.ne.jp>
- Date: Tue, 29 Sep 2009 16:09:05 +0900
- Message-id: <1254224195.717275.22510@ppp.dion.ne.jp>
Package: apt
Version: 0.7.24
Severity: important
Tags: patch
"apt-cache search" abort if locale is ja_JP.eucJP.
$ locale
LANG=ja_JP.eucJP
LC_CTYPE="ja_JP.eucJP"
LC_NUMERIC="ja_JP.eucJP"
LC_TIME="ja_JP.eucJP"
LC_COLLATE="ja_JP.eucJP"
LC_MONETARY="ja_JP.eucJP"
LC_MESSAGES="ja_JP.eucJP"
LC_PAPER="ja_JP.eucJP"
LC_NAME="ja_JP.eucJP"
LC_ADDRESS="ja_JP.eucJP"
LC_TELEPHONE="ja_JP.eucJP"
LC_MEASUREMENT="ja_JP.eucJP"
LC_IDENTIFICATION="ja_JP.eucJP"
LC_ALL=
$ apt-cache search abcdefg
*** glibc detected *** apt-cache: free(): invalid next size (normal): 0x0000000001651ba0 ***
======= Backtrace: =========
/lib/libc.so.6[0x7ffad1ff76c8]
/lib/libc.so.6(cfree+0x76)[0x7ffad1ff91d6]
apt-cache[0x407266]
/usr/lib/libapt-pkg-libc6.9-6.so.4.8(_ZN11CommandLine11DispatchArgEPNS_8DispatchEb+0x55)[0x7ffad2ab84d5]
apt-cache[0x40969f]
/lib/libc.so.6(__libc_start_main+0xe6)[0x7ffad1fa45c6]
apt-cache[0x403679]
======= Memory map: ========
00400000-0040f000 r-xp 00000000 fe:02 11645 /usr/bin/apt-cache
0060f000-00610000 rw-p 0000f000 fe:02 11645 /usr/bin/apt-cache
01600000-01667000 rw-p 00000000 00:00 0 [heap]
7ffac8000000-7ffac8021000 rw-p 00000000 00:00 0
7ffac8021000-7ffacc000000 ---p 00000000 00:00 0
7ffacff62000-7ffad1762000 rw-p 00000000 00:00 0
7ffad1762000-7ffad177a000 r-xp 00000000 fe:02 16931 /usr/lib/gconv/libJIS.so
7ffad177a000-7ffad1979000 ---p 00018000 fe:02 16931 /usr/lib/gconv/libJIS.so
7ffad1979000-7ffad197a000 r--p 00017000 fe:02 16931 /usr/lib/gconv/libJIS.so
7ffad197a000-7ffad197b000 rw-p 00018000 fe:02 16931 /usr/lib/gconv/libJIS.so
7ffad197b000-7ffad197e000 r-xp 00000000 fe:02 15895 /usr/lib/gconv/EUC-JP.so
7ffad197e000-7ffad1b7d000 ---p 00003000 fe:02 15895 /usr/lib/gconv/EUC-JP.so
7ffad1b7d000-7ffad1b7e000 r--p 00002000 fe:02 15895 /usr/lib/gconv/EUC-JP.so
7ffad1b7e000-7ffad1b7f000 rw-p 00003000 fe:02 15895 /usr/lib/gconv/EUC-JP.so
7ffad1b7f000-7ffad1b81000 r-xp 00000000 fe:01 1066 /lib/libdl-2.9.so
7ffad1b81000-7ffad1d81000 ---p 00002000 fe:01 1066 /lib/libdl-2.9.so
7ffad1d81000-7ffad1d82000 r--p 00002000 fe:01 1066 /lib/libdl-2.9.so
7ffad1d82000-7ffad1d83000 rw-p 00003000 fe:01 1066 /lib/libdl-2.9.so
7ffad1d83000-7ffad1d85000 r-xp 00000000 fe:01 1060 /lib/libutil-2.9.so
7ffad1d85000-7ffad1f84000 ---p 00002000 fe:01 1060 /lib/libutil-2.9.so
7ffad1f84000-7ffad1f85000 r--p 00001000 fe:01 1060 /lib/libutil-2.9.so
7ffad1f85000-7ffad1f86000 rw-p 00002000 fe:01 1060 /lib/libutil-2.9.so
7ffad1f86000-7ffad20cd000 r-xp 00000000 fe:01 922 /lib/libc-2.9.so
7ffad20cd000-7ffad22cd000 ---p 00147000 fe:01 922 /lib/libc-2.9.so
7ffad22cd000-7ffad22d1000 r--p 00147000 fe:01 922 /lib/libc-2.9.so
7ffad22d1000-7ffad22d2000 rw-p 0014b000 fe:01 922 /lib/libc-2.9.so
7ffad22d2000-7ffad22d7000 rw-p 00000000 00:00 0
7ffad22d7000-7ffad22f1000 r-xp 00000000 fe:01 216 /lib/libgcc_s.so.1
7ffad22f1000-7ffad24f0000 ---p 0001a000 fe:01 216 /lib/libgcc_s.so.1
7ffad24f0000-7ffad24f1000 rw-p 00019000 fe:01 216 /lib/libgcc_s.so.1
7ffad24f1000-7ffad2573000 r-xp 00000000 fe:01 913 /lib/libm-2.9.so
7ffad2573000-7ffad2772000 ---p 00082000 fe:01 913 /lib/libm-2.9.so
7ffad2772000-7ffad2773000 r--p 00081000 fe:01 913 /lib/libm-2.9.so
7ffad2773000-7ffad2774000 rw-p 00082000 fe:01 913 /lib/libm-2.9.so
7ffad2774000-7ffad2866000 r-xp 00000000 fe:02 69 /usr/lib/libstdc++.so.6.0.13
7ffad2866000-7ffad2a66000 ---p 000f2000 fe:02 69 /usr/lib/libstdc++.so.6.0.13
7ffad2a66000-7ffad2a6d000 r--p 000f2000 fe:02 69 /usr/lib/libstdc++.so.6.0.13
7ffad2a6d000-7ffad2a6f000 rw-p 000f9000 fe:02 69 /usr/lib/libstdc++.so.6.0.13
7ffad2a6f000-7ffad2a84000 rw-p 00000000 00:00 0
7ffad2a84000-7ffad2b48000 r-xp 00000000 fe:02 5146 /usr/lib/libapt-pkg-libc6.9-6.so.4.8.1
7ffad2b48000-7ffad2d47000 ---p 000c4000 fe:02 5146 /usr/lib/libapt-pkg-libc6.9-6.so.4.8.1
7ffad2d47000-7ffad2d4c000 rw-p 000c3000 fe:02 5146 /usr/lib/libapt-pkg-libc6.9-6.so.4.8.1
7ffad2d4c000-7ffad2d69000 r-xp 00000000 fe:01 918 /lib/ld-2.9.so
7ffad2dc6000-7ffad2e50000 rw-p 00000000 00:00 0
7ffad2e50000-7ffad2e57000 r--s 00000000 fe:02 814 /usr/lib/gconv/gconv-modules.cache
7ffad2e57000-7ffad2e5f000 r--p 00000000 fe:02 15839 /usr/share/locale/ja/LC_MESSAGES/libapt-pkg4.8.mo
7ffad2e5f000-7ffad2f5c000 r--p 00000000 fe:02 21 /usr/lib/locale/locale-archive
7ffad2f5c000-7ffad2f60000 rw-p 00000000 00:00 0
7ffad2f65000-7ffad2f68000 rw-p 00000000 00:00 0
7ffad2f68000-7ffad2f69000 r--p 0001c000 fe:01 918 /lib/ld-2.9.so
7ffad2f69000-7ffad2f6a000 rw-p 0001d000 fe:01 918 /lib/ld-2.9.so
7fffac8c3000-7fffac8d8000 rw-p 00000000 00:00 0 [stack]
7fffac9e0000-7fffac9e1000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
zsh: abort (core dumped) apt-cache search abcdefg
-- Package-specific info:
-- apt-config dump --
APT "";
APT::Architecture "amd64";
APT::Build-Essential "";
APT::Build-Essential:: "build-essential";
APT::Install-Recommends "false";
APT::Install-Suggests "0";
APT::Acquire "";
APT::Acquire::Translation "environment";
APT::NeverAutoRemove "";
APT::NeverAutoRemove:: "^linux-image.*";
APT::NeverAutoRemove:: "^linux-restricted-modules.*";
Dir "/";
Dir::State "var/lib/apt/";
Dir::State::lists "lists/";
Dir::State::cdroms "cdroms.list";
Dir::State::userstatus "status.user";
Dir::State::status "/var/lib/dpkg/status";
Dir::Cache "var/cache/apt/";
Dir::Cache::archives "archives/";
Dir::Cache::srcpkgcache "srcpkgcache.bin";
Dir::Cache::pkgcache "pkgcache.bin";
Dir::Etc "etc/apt/";
Dir::Etc::sourcelist "sources.list";
Dir::Etc::sourceparts "sources.list.d";
Dir::Etc::vendorlist "vendors.list";
Dir::Etc::vendorparts "vendors.list.d";
Dir::Etc::main "apt.conf";
Dir::Etc::parts "apt.conf.d";
Dir::Etc::preferences "preferences";
Dir::Etc::preferencesparts "preferences.d";
Dir::Bin "";
Dir::Bin::methods "/usr/lib/apt/methods";
Dir::Bin::dpkg "/usr/bin/dpkg";
Dir::Log "var/log/apt";
Dir::Log::Terminal "term.log";
DPkg "";
DPkg::Pre-Install-Pkgs "";
DPkg::Pre-Install-Pkgs:: "/usr/sbin/dpkg-preconfigure --apt || true";
-- (no /etc/apt/preferences present) --
-- (no /etc/apt/sources.list present) --
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.31
Locale: LANG=ja_JP.eucJP, LC_CTYPE=ja_JP.eucJP (charmap=EUC-JP)
Shell: /bin/sh linked to /bin/bash
Versions of packages apt depends on:
ii debian-archive-keyring 2009.01.31 GnuPG archive keys of the Debian a
ii libc6 2.9-26 GNU C Library: Shared libraries
ii libgcc1 1:4.4.1-4 GCC support library
ii libstdc++6 4.4.1-4 The GNU Standard C++ Library v3
apt recommends no packages.
Versions of packages apt suggests:
pn apt-doc <none> (no description available)
pn aptitude | synaptic | wajig <none> (no description available)
ii bzip2 1.0.5-3 high-quality block-sorting file co
ii dpkg-dev 1.15.4 Debian package development tools
ii lzma 4.43-14 Compression method of 7z format in
pn python-apt <none> (no description available)
-- no debconf information
--- apt-0.7.24.orig/apt-pkg/contrib/strutl.cc 2009-09-26 02:58:21.000000000 +0900
+++ apt-0.7.24/apt-pkg/contrib/strutl.cc 2009-09-29 12:20:44.896960589 +0900
@@ -43,8 +43,8 @@ bool UTF8ToCodeset(const char *codeset,
{
iconv_t cd;
const char *inbuf;
- char *inptr, *outbuf, *outptr;
- size_t insize, outsize;
+ char *inptr, *outbuf;
+ size_t insize, bufsize;
cd = iconv_open(codeset, "UTF-8");
if (cd == (iconv_t)(-1)) {
@@ -61,27 +61,41 @@ bool UTF8ToCodeset(const char *codeset,
return false;
}
- insize = outsize = orig.size();
+ insize = bufsize = orig.size();
inbuf = orig.data();
inptr = (char *)inbuf;
- outbuf = new char[insize+1];
- outptr = outbuf;
+ outbuf = new char[bufsize];
+ dest->clear();
while (insize != 0)
{
+ char *outptr = outbuf;
+ size_t outsize = bufsize;
size_t const err = iconv(cd, &inptr, &insize, &outptr, &outsize);
+ dest->append(outbuf, outptr - outbuf);
if (err == (size_t)(-1))
{
- insize--;
- outsize++;
- inptr++;
- *outptr = '?';
- outptr++;
+ switch (errno)
+ {
+ case EILSEQ:
+ insize--;
+ inptr++;
+ break;
+ case EINVAL:
+ insize = 0;
+ break;
+ case E2BIG:
+ if (outptr == outbuf)
+ {
+ bufsize *= 2;
+ delete[] outbuf;
+ outbuf = new char[bufsize];
+ }
+ break;
+ }
}
}
- *outptr = '\0';
- *dest = outbuf;
delete[] outbuf;
iconv_close(cd);
--- End Message ---
--- Begin Message ---
Source: apt
Source-Version: 0.7.25.2
We believe that the bug you reported is fixed in the latest version of
apt, which is due to be installed in the Debian FTP archive:
apt-doc_0.7.25.2_all.deb
to main/a/apt/apt-doc_0.7.25.2_all.deb
apt-transport-https_0.7.25.2_i386.deb
to main/a/apt/apt-transport-https_0.7.25.2_i386.deb
apt-utils_0.7.25.2_i386.deb
to main/a/apt/apt-utils_0.7.25.2_i386.deb
apt_0.7.25.2.dsc
to main/a/apt/apt_0.7.25.2.dsc
apt_0.7.25.2.tar.gz
to main/a/apt/apt_0.7.25.2.tar.gz
apt_0.7.25.2_i386.deb
to main/a/apt/apt_0.7.25.2_i386.deb
libapt-pkg-dev_0.7.25.2_i386.deb
to main/a/apt/libapt-pkg-dev_0.7.25.2_i386.deb
libapt-pkg-doc_0.7.25.2_all.deb
to main/a/apt/libapt-pkg-doc_0.7.25.2_all.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 548884@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Michael Vogt <mvo@debian.org> (supplier of updated apt 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.8
Date: Wed, 27 Jan 2010 16:16:10 +0100
Source: apt
Binary: apt apt-doc libapt-pkg-dev libapt-pkg-doc apt-utils apt-transport-https
Architecture: source all i386
Version: 0.7.25.2
Distribution: unstable
Urgency: low
Maintainer: APT Development Team <deity@lists.debian.org>
Changed-By: Michael Vogt <mvo@debian.org>
Description:
apt - Advanced front-end for dpkg
apt-doc - Documentation for APT
apt-transport-https - APT https transport
apt-utils - APT utility programs
libapt-pkg-dev - Development files for APT's libapt-pkg and libapt-inst
libapt-pkg-doc - Documentation for APT development
Closes: 475770 534920 548884 549312 558348 561636 565213 566664
Changes:
apt (0.7.25.2) unstable; urgency=low
.
[ Michael Vogt ]
* apt-pkg/contrib/cdromutl.cc:
- fix UnmountCdrom() fails, give it a bit more time and try
the umount again
* apt-pkg/cdrom.cc:
- fix crash in pkgUdevCdromDevices
* methods/cdrom.cc:
- fixes in multi cdrom setup code (closes: #549312)
- add new "Acquire::cdrom::AutoDetect" config that enables/disables
the dlopen of libudev for automatic cdrom detection. Off by default
currently, feedback/testing welcome
* cmdline/apt-cdrom.cc:
- add new --auto-detect option that uses libudev to figure out
the cdrom/mount-point
* cmdline/apt-mark:
- merge fix from Gene Cash that supports markauto for
packages that are not in the extended_states file yet
(closes: #534920)
* ftparchive/writer.{cc,h}:
- merge crash fix for apt-ftparchive on hurd, thanks to
Samuel Thibault for the patch (closes: #566664)
.
[ David Kalnischkies ]
* apt-pkg/contrib/fileutl.cc:
- Fix the newly introduced method GetListOfFilesInDir to not
accept every file if no extension is enforced
(= restore old behaviour). (Closes: #565213)
* apt-pkg/policy.cc:
- accept also partfiles with "pref" file extension as valid
* apt-pkg/contrib/configuration.cc:
- accept also partfiles with "conf" file extension as valid
* doc/apt.conf.5.xml:
- reorder description and split out syntax
- add partfile name convention (Closes: #558348)
* doc/apt_preferences.conf.5.xml:
- describe partfile name convention also here
* apt-pkg/deb/dpkgpm.cc:
- don't segfault if term.log file can't be opened.
Thanks Sam Brightman for the patch! (Closes: #475770)
* doc/*:
- replace the per language addendum with a global addendum
- add a explanation why translations include (maybe) english
parts to the new global addendum (Closes: #561636)
* apt-pkg/contrib/strutl.cc:
- fix malloc asseration fail with ja_JP.eucJP locale in
apt-cache search. Thanks Kusanagi Kouichi! (Closes: #548884)
.
[ Christian Perrier ]
* French translation update
Checksums-Sha1:
ac8305749e6789a9a561cd9c4d63ea422944308f 1212 apt_0.7.25.2.dsc
fa713204e67a625b8e49a400d3469e8daa9896a0 2646304 apt_0.7.25.2.tar.gz
db9709015dc7d2b6f9ad184d58e1a749f4f20f0b 138688 apt-doc_0.7.25.2_all.deb
db2869f81e2a06dd19eb634b06d737911019c77d 133138 libapt-pkg-doc_0.7.25.2_all.deb
b4d1feefb88a0a08abf4c5a04c3f87968d139f6d 1749128 apt_0.7.25.2_i386.deb
963550225280eb30c45a6f4736675db53b459037 121454 libapt-pkg-dev_0.7.25.2_i386.deb
c687ff00e73f52557257e5041d94ccde83ae793f 223736 apt-utils_0.7.25.2_i386.deb
bd524432662e1625d774e723f9ba6db9950ff0d3 69524 apt-transport-https_0.7.25.2_i386.deb
Checksums-Sha256:
44004edba97d9654afcc93d8646d726e1ae82c78c03c4fe411527dd62fc29e29 1212 apt_0.7.25.2.dsc
f3af72df41fafebe47793c9d17b220124c781b8b47fa5ced4d2b431bc9518982 2646304 apt_0.7.25.2.tar.gz
878c3e51e3e4060dc65fb73bdc049eec0224bc0c528d57c5120c287ac1b7937e 138688 apt-doc_0.7.25.2_all.deb
2e057e32f8ab3b98cfa375cbe7c5cadc8bc3880f9f817ff278e18bac3d4ca405 133138 libapt-pkg-doc_0.7.25.2_all.deb
57c421ee407bca76a4795c97b67f2f45d3568e11bbc96db321d619aef4a892e5 1749128 apt_0.7.25.2_i386.deb
db8c1ce6850ebc399e712877800559e8ec7dbb7c6d016733cc43bc50931d3468 121454 libapt-pkg-dev_0.7.25.2_i386.deb
59a865beea3135631a0f32070f68c61174d994431d1df0a2e874073bee2c9cbb 223736 apt-utils_0.7.25.2_i386.deb
35e8d4f9641b77c8610524db5f300954f729975d52752ee718eb684ec35fe314 69524 apt-transport-https_0.7.25.2_i386.deb
Files:
aa6cb570c3de9459ed6a3af70c238402 1212 admin important apt_0.7.25.2.dsc
1e240fd7d4503153a8d8db3f06773450 2646304 admin important apt_0.7.25.2.tar.gz
605a43301f186f34ce84edf871770af1 138688 doc optional apt-doc_0.7.25.2_all.deb
c9af37ba5f8c36a64647caf3ba17e633 133138 doc optional libapt-pkg-doc_0.7.25.2_all.deb
87c4d91f33925da75712cb30cb473e92 1749128 admin important apt_0.7.25.2_i386.deb
3465b3582136a2f203327f75bb9b0e8d 121454 libdevel optional libapt-pkg-dev_0.7.25.2_i386.deb
4f17df3fa19c7af740f5e3b5913a16bf 223736 admin important apt-utils_0.7.25.2_i386.deb
0ad50ab47182e4194566943d8c151c9a 69524 admin optional apt-transport-https_0.7.25.2_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iEYEARECAAYFAktgqasACgkQliSD4VZixzRGSQCbBU3kP/cCg6bfrLwsqp2V9Jf6
S/oAni9fA85eTJevy8o/JU5t9OcLHP08
=VcjT
-----END PGP SIGNATURE-----
--- End Message ---