Bug 712901

Summary: glibc gb18030 cjkb support gone in glibc-2.14-2
Product: [Fedora] Fedora Reporter: dgod.osa <dgod.osa>
Component: glibcAssignee: Andreas Schwab <schwab>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: fweimer, jakub, loganjerry, schwab
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: glibc-2.14-4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-03 19:21:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
the test data have a cjk-b character
none
Program that segfaults on iconv none

Description dgod.osa 2011-06-13 14:32:03 UTC
Description of problem:
when I update to glibc-2.14-2.i686, glibc don't support cjk-b now. In old version, it can work.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. use the attatchment 1.txt
2. run iconv, "cat 1.txt | iconv -t GB18030"
  
Actual results:
report error
iconv: illegal input sequence at position 0

Expected results:
no error report

Additional info:
the first character is 

Comment 1 dgod.osa 2011-06-13 14:36:23 UTC
Created attachment 504464 [details]
the test data have a cjk-b character


the test data have a cjk-b character
GB18030 9534ce36
UNICODE u+20cd0

Comment 2 dgod.osa 2011-06-19 04:27:00 UTC
glibc-2.14-1 can't work too
glibc-2.13.90-12 is right

so maybe merge of gb18030-2005 cause this problem

Comment 3 Fedora Update System 2011-06-22 15:45:09 UTC
glibc-2.14-3 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/glibc-2.14-3

Comment 4 dgod.osa 2011-06-23 13:19:48 UTC
glibc-2.14-3 fix this bug here.

Comment 5 Fedora Update System 2011-06-24 03:38:42 UTC
Package glibc-2.14-3:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing glibc-2.14-3'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/glibc-2.14-3
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2011-06-24 17:54:20 UTC
glibc-2.14-3 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Jerry James 2011-06-25 21:49:49 UTC
clisp is currently segfaulting while running its tests on Fedora 15 and Rawhide, and it has something to do with the gb18030 encoding.  Here's part of a debug run I just did to try to figure out the problem:

$ cd rpmbuild/BUILD/clisp-2.49/build/tests
$ gdb ../lisp.run
...
(gdb) run -E utf-8 -norc -B ../ -N ../locale -M ../lispinit.mem -m 30MW -L english -i tests -x "(time (run-all-tests))"
[ ... lots of successful tests elided ... ]
(LET ((LIST NIL)) (DO-EXTERNAL-SYMBOLS (SYM (FIND-PACKAGE "CHARSET")) (PUSH (LIST SYM (ASH (LENGTH (SYSTEM::GET-CHARSET-RANGE (ENCODING-CHARSET (SYMBOL-VALUE SYM)))) -1)) LIST)) (SETQ LIST (SORT LIST #'< :KEY #'SECOND)) (FORMAT T "~& ~:D encoding~:P:~%~:{~25@A: ~5:D~%~}" (LENGTH LIST) LIST))

Program received signal SIGSEGV, Segmentation fault.
gconv (step=0x9009e0, data=0x9103b0, inptrp=0x7ffffffedc00, 
    inend=0x7ffffffedb94 "\003", outbufstart=0x0, irreversible=0x7ffffffedaf0, 
    do_flush=0, consume_incomplete=0) at ../iconv/skeleton.c:615
615			status = TO_LOOP (step, data, inptrp, inend, &outbuf, outend,
(gdb) bt
#0  gconv (step=0x9009e0, data=0x9103b0, inptrp=0x7ffffffedc00, 
    inend=0x7ffffffedb94 "\003", outbufstart=0x0, irreversible=0x7ffffffedaf0, 
    do_flush=0, consume_incomplete=0) at ../iconv/skeleton.c:615
#1  0x00000034a0822524 in __gconv (cd=0x9103a0, inbuf=0x7ffffffedc00, 
    inbufend=0x7ffffffedb94 "\003", outbuf=0x7ffffffedc08, 
    outbufend=<optimized out>, irreversible=0x7ffffffedaf0) at gconv.c:80
#2  0x00000034a0821b3a in iconv (cd=<optimized out>, inbuf=0x7ffffffedc00, 
    inbytesleft=0x7ffffffedbf8, outbuf=0x7ffffffedc08, 
    outbytesleft=0x7ffffffedc10) at iconv.c:53
#3  0x00000000004a8fd4 in iconv_range (encoding=..., start=0, end=1114111, 
    maxintervals=4294967295) at ../src/stream.d:4416
#4  0x0000000000476756 in C_charset_range () at ../src/encoding.d:2179
[ ... much more elided ...]
(gdb) frame 4
#4  0x0000000000476756 in C_charset_range () at ../src/encoding.d:2179
2179	  VALUES1(i1 <= i2 ?
(gdb) info locals
maxintervals = 4294967295
i2 = 1114111
i1 = 0
encoding = {one_o = 3377713472860208}
(gdb) call object_out(encoding)
#<ENCODING "GB18030" :UNIX>
$1 = {one_o = 3377713472860208}

This is with glibc-2.14-3.x86_64 on a Fedora 15 machine.  I'll see if I can up with a C code reproducer.  Does this look like it might be the same bug?

Comment 8 Jerry James 2011-06-25 23:12:00 UTC
Created attachment 509931 [details]
Program that segfaults on iconv

Here's a (somewhat lame) program that illustrates the problem.  If you run it as "./test ENCODING" it attempts to print every codepoint that is valid in that encoding.  Passing "gb18030" as the encoding name results in a segfault while attempting to convert 0x20087.

Comment 9 Fedora Update System 2011-06-28 16:07:11 UTC
glibc-2.14-4 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/glibc-2.14-4

Comment 10 Fedora Update System 2011-06-28 20:29:26 UTC
Package glibc-2.14-4:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing glibc-2.14-4'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/glibc-2.14-4
then log in and leave karma (feedback).

Comment 11 Fedora Update System 2011-07-03 19:21:05 UTC
glibc-2.14-4 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.