Jean-Marc Lasgouttes wrote:

Koji, I am slowly looking at this again. It is normal that the value
of outbuf is changed by iconv, since it is incremented to point to the
end of the converted string.

I see.

I am not sure. What are the values of the variables before and after
the call
        int bytes = processor.convert(inbuf, inbytesleft, outbuf, outsize);
in iconv_convert? What is the return value?

It seems this function is called multiple times, initially succeeds and fails later. When the call was successful:

(1) Before the call of processor.convert()
        (gdb) p inbuf:          $3 = 0x878850c "T"
        (gdb) p inbytesleft:    $4 = 36
        (gdb) p outbuf:         $5 = 0x8750e60 "The owner"
        (gdb) p outsize:        $6 = 32768
(2) After
        (gdb) p inbuf:          $7 = 0x878850c "T"
        (gdb) p inbytesleft:    $8 = 36
        (gdb) p outbuf:         $9 = 0x8750e60 "The owner"
        (gdb) p outsize:        $10 = 32768
        (gdb) p bytes:          $11 = 9

When it is called just before crash:

(1) Before
        (gdb) p inbuf:          $29 = 0x87f22ec "C"
        (gdb) p inbytesleft:    $30 = 4
        (gdb) p outbuf:         $31 = 0x8750e60
        "/home/ujis/print/lyx-devel2/work/lyx-1.5.0beta2/src/lyx-qt4"
        (gdb) p outsize:        $32 = 32768
(2) After
        (gdb) p inbuf:          $33 = 0x87f22ec "C"
        (gdb) p inbytesleft:    $34 = 4
        (gdb) p outbuf:         $35 = 0x8750e60
        "Chome/ujis/print/lyx-devel2/work/lyx-1.5.0beta2/src/lyx-qt4"
        (gdb) p outsize:        $36 = 32768
        (gdb) p bytes:          $37 = 1

Koji


Reply via email to