This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bug in libiconv?


On 1/24/2011 10:09 PM, Charles Wilson wrote:
> Now, since there has not yet been an updated upstream release of
> libiconv, my first step would be to simply rebuild our existing
> libiconv-1.13.1 on a platform with current cygwin (1.7.7-1), and try the
> test case again.

Rebuilt libiconv against 20110117 snapshot.  Built test case.  Still see
erroneous behavior:

iconv: 138 <Invalid or incomplete multibyte or wide character>
in = <Liian pitkà sana>, inbuf = <à sana>, inbytesleft = 7, outbytesleft
= 492
iconv: 138 <Invalid or incomplete multibyte or wide character>
in = <Liian pitkà sana>, inbuf = <à sana>, inbytesleft = 7, outbytesleft
= 492
iconv: 138 <Invalid or incomplete multibyte or wide character>
in = <Liian pitkà sana>, inbuf = <à sana>, inbytesleft = 7, outbytesleft
= 492
in = <Liian pitkà sana>, inbuf = <>, inbytesleft = 0, outbytesleft = 480

> If that doesn't correct the issue...then I'd try to run your test case
> on linux, but *explicitly* using libiconv on that system, rather than
> (as is typically the case on linux) relying on the underlying glibc
> implementation of iconv functionality. 

Did this.  Here are the characteristics of the test case object and
executable:

$ ldd ./foo
        linux-vdso.so.1 =>  (0x00007fff51928000)
        libiconv.so.2 => /home/me/libiconv/_inst/lib/libiconv.so.2
(0x00007f0b7d7dd000)
        libc.so.6 => /lib64/libc.so.6 (0x0000003d5b400000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003d5b000000)

$ nm foo.o | grep ' U '
                 U __errno_location
                 U exit
                 U fprintf
         >>      U iconv
         >>      U iconv_close
         >>      U iconv_open
                 U printf
                 U setlocale
                 U stderr
                 U strerror
                 U strlen

It works fine:

in = <Liian pitkà sana>, inbuf = <>, inbytesleft = 0, outbytesleft = 960
in = <Liian pitkà sana>, inbuf = <>, inbytesleft = 0, outbytesleft = 960
in = <Liian pitkà sana>, inbuf = <>, inbytesleft = 0, outbytesleft = 960
in = <Liian pitkà sana>, inbuf = <>, inbytesleft = 0, outbytesleft = 960

> If the test case fails there,
> then we've got a presumption that the problem is in the (generic,
> cross-platform bits of) libiconv library itself. 

Well, apparently the problem is not the generic, cross-platform bits of
libiconv.  It's in the cygwin-specific bits, and/or how it interfaces
with cygwin's underlying charset manips.  So...

> Then, it's debugging
> time... :-(

...it's still debugging time.  Sigh.

--
Chuck

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]