bug-gnu-libiconv
[Top][All Lists]
Advanced

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

[bug-gnu-libiconv] iconv segfaults when converting shift-jis string to u


From: Jordan Bradley
Subject: [bug-gnu-libiconv] iconv segfaults when converting shift-jis string to utf-8
Date: Wed, 21 Mar 2012 16:05:15 -0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2

Hello all,

In the program I am writing I am dealing with shift-jis strings and later printing them in utf-8 format for reading. The success I'm having is inconsistent. This is what I have so far so that I can figure out how to use iconv properly: http://pastebin.com/z7Zgs8LA This is the backtrace from gdb when run under mingw:

address@hidden ~
$ gcc -g iconv_test.c -l iconv
address@hidden ~
$ gdb a.exe
GNU gdb (GDB) 7.4
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from C:\MinGW\msys\1.0\home\Jordan\a.exe...done.
(gdb) run
Starting program: C:\MinGW\msys\1.0\home\Jordan\a.exe
[New Thread 4284.0x440]

Program received signal SIGSEGV, Segmentation fault.
0x6601193b in libiconv (icd=0xffffffff, inbuf=0x28ff04, inbytesleft=0x28fee0,
    outbuf=0x28fee4, outbytesleft=0x28fedc) at ./iconv.c:254
254         return cd->lfuncs.loop_convert(icd,
(gdb) backtrace
#0  0x6601193b in libiconv (icd=0xffffffff, inbuf=0x28ff04,
    inbytesleft=0x28fee0, outbuf=0x28fee4, outbytesleft=0x28fedc)
    at ./iconv.c:254
#1  0x0040141e in print_tripcode (job=0x0,
    password=0x352648 "]é\217_]\210\016P", tripcode=0x4030ad "Win/gentoo")
    at iconv_test.c:17
#2  0x00401526 in main () at iconv_test.c:45
(gdb)

What am I doing wrong?

Thanks in advance.

Jordan Bradley



reply via email to

[Prev in Thread] Current Thread [Next in Thread]