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

Bug#409494: marked as done (Segmentation fault in iconv_open/iconv_close for some encodings in some sequence)



Your message dated Fri, 20 Apr 2007 19:24:08 +0200
with message-id <20070420172405.GA1349@i386.aurel32.net>
and subject line Segmentation fault in iconv_open/iconv_close for some encodings in some sequence
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.3.2.ds1-22

iconv_open and iconv_close for some encodings in some sequence causes
Segmentation fault. I`m stable reproduce segmentation fault only with
static linking. Without static linking reproduce error more difficult.
Here is a transcript:

$ cat bug1.cpp
#include <iostream>
#include <iconv.h>

int main( int argc, char* const argv[] )
{
    iconv_t cd;

    cd = iconv_open( "CP1251" ,"UTF-8" );
    iconv_close( cd );

    cd = iconv_open( "IBM866" ,"UTF-8" );
    iconv_close( cd );

    cd = iconv_open( "KOI8-R" ,"UTF-8" );
    iconv_close( cd );

    cd = iconv_open( "ISO_8859-5" ,"UTF-8" );
    iconv_close( cd );

    cd = iconv_open( "CP1251" ,"UTF-8" );
    std::cerr << "UTF-8 -> CP1251 iconv_open() done.\n";

    iconv_close( cd ); // Segmentation fault
    std::cerr << "UTF-8 -> CP1251 iconv_close() done.\n";
}

$ g++ -O0 -Wall -c bug1.cpp
$ libtool --mode=link g++ -o bug1 -all-static bug1.o

$ ./bug1 
UTF-8 -> CP1251 iconv_open() done.
Segmentation fault

I am using:

$ g++ --version
g++ (GCC) 3.3.5 (Debian 1:3.3.5-13)

$ libtool --version
$ ltmain.sh (GNU libtool) 1.5.6 (1.1220.2.95 2004/04/11 05:50:42) Debian: 224 $

$ ls -l /lib/libc.so.6
lrwxrwxrwx  1 root root 13 2005-09-01 00:50 /lib/libc.so.6 -> libc-2.3.2.so

$ dpkg -s libc6 | grep ^Version
Version: 2.3.2.ds1-22

$ dpkg -s libc6-dev | grep ^Version
Version: 2.3.2.ds1-22

Debian GNU/Linux 3.1r1 (Sarge)
kernel 2.6.8-2-k7 and 2.6.18 (on another PC)

--
Dmitry Telegin


--- End Message ---
--- Begin Message ---
Version: 2.5-1

On Sat, Feb 03, 2007 at 08:02:15PM +0400, Dmitry-T wrote:
> Package: libc6
> Version: 2.3.2.ds1-22
> 
> iconv_open and iconv_close for some encodings in some sequence causes
> Segmentation fault. I`m stable reproduce segmentation fault only with
> static linking. Without static linking reproduce error more difficult.
> Here is a transcript:
> 
> $ cat bug1.cpp
> #include <iostream>
> #include <iconv.h>
> 
> int main( int argc, char* const argv[] )
> {
>     iconv_t cd;
> 
>     cd = iconv_open( "CP1251" ,"UTF-8" );
>     iconv_close( cd );
> 
>     cd = iconv_open( "IBM866" ,"UTF-8" );
>     iconv_close( cd );
> 
>     cd = iconv_open( "KOI8-R" ,"UTF-8" );
>     iconv_close( cd );
> 
>     cd = iconv_open( "ISO_8859-5" ,"UTF-8" );
>     iconv_close( cd );
> 
>     cd = iconv_open( "CP1251" ,"UTF-8" );
>     std::cerr << "UTF-8 -> CP1251 iconv_open() done.\n";
> 
>     iconv_close( cd ); // Segmentation fault
>     std::cerr << "UTF-8 -> CP1251 iconv_close() done.\n";
> }
> 
> $ g++ -O0 -Wall -c bug1.cpp
> $ libtool --mode=link g++ -o bug1 -all-static bug1.o
> 
> $ ./bug1 
> UTF-8 -> CP1251 iconv_open() done.
> Segmentation fault
> 
> I am using:
> 
> $ g++ --version
> g++ (GCC) 3.3.5 (Debian 1:3.3.5-13)
> 
> $ libtool --version
> $ ltmain.sh (GNU libtool) 1.5.6 (1.1220.2.95 2004/04/11 05:50:42) Debian: 224 $
> 
> $ ls -l /lib/libc.so.6
> lrwxrwxrwx  1 root root 13 2005-09-01 00:50 /lib/libc.so.6 -> libc-2.3.2.so
> 
> $ dpkg -s libc6 | grep ^Version
> Version: 2.3.2.ds1-22
> 
> $ dpkg -s libc6-dev | grep ^Version
> Version: 2.3.2.ds1-22
> 
> Debian GNU/Linux 3.1r1 (Sarge)
> kernel 2.6.8-2-k7 and 2.6.18 (on another PC)
> 

This bug is not present anymore in glibc 2.5-1, closing the bug.

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net

--- End Message ---

Reply to: