public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/13439] New: iconv and Qt work inproperly
@ 2011-11-25 17:10 wengxt at gmail dot com
  2011-11-25 19:15 ` [Bug libc/13439] " aj at suse dot de
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: wengxt at gmail dot com @ 2011-11-25 17:10 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=13439

             Bug #: 13439
           Summary: iconv and Qt work inproperly
           Product: glibc
           Version: 2.14
            Status: NEW
          Severity: critical
          Priority: P2
         Component: libc
        AssignedTo: drepper.fsp@gmail.com
        ReportedBy: wengxt@gmail.com
    Classification: Unclassified


Here is a piece of code: http://pastebin.com/GpwkwWm2
On Archlinux with glibc 2.14.1

The final output will be ㄀㄀㄀㄀㄀㄀.

Seems it works with glibc 2.13.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libc/13439] iconv and Qt work inproperly
  2011-11-25 17:10 [Bug libc/13439] New: iconv and Qt work inproperly wengxt at gmail dot com
@ 2011-11-25 19:15 ` aj at suse dot de
  2011-11-25 21:31 ` wengxt at gmail dot com
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: aj at suse dot de @ 2011-11-25 19:15 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=13439

Andreas Jaeger <aj at suse dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING
                 CC|                            |aj at suse dot de

--- Comment #1 from Andreas Jaeger <aj at suse dot de> 2011-11-25 19:14:27 UTC ---
Please provide a self-contained testcase without any other libraries like Qt
involved.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libc/13439] iconv and Qt work inproperly
  2011-11-25 17:10 [Bug libc/13439] New: iconv and Qt work inproperly wengxt at gmail dot com
  2011-11-25 19:15 ` [Bug libc/13439] " aj at suse dot de
@ 2011-11-25 21:31 ` wengxt at gmail dot com
  2011-11-28  8:59 ` aj at suse dot de
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: wengxt at gmail dot com @ 2011-11-25 21:31 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=13439

--- Comment #2 from Weng Xuetian <wengxt at gmail dot com> 2011-11-25 21:31:06 UTC ---
http://pastebin.com/ZXvwn70y

Ok, to make the problem clear.
iconv_open("UTF-8", "UTF-16") in glibc 2.13 will not remember the endianness ,
while glib 2.14 will remember it, no matter another iconv_open is called.

glibc 2.13 output
マーベラスエンターテイメント
マ

====================
glibc 2.14 output
マーベラスエンターテイメント

====================

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libc/13439] iconv and Qt work inproperly
  2011-11-25 17:10 [Bug libc/13439] New: iconv and Qt work inproperly wengxt at gmail dot com
  2011-11-25 19:15 ` [Bug libc/13439] " aj at suse dot de
  2011-11-25 21:31 ` wengxt at gmail dot com
@ 2011-11-28  8:59 ` aj at suse dot de
  2011-12-18  2:11 ` drepper.fsp at gmail dot com
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: aj at suse dot de @ 2011-11-28  8:59 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=13439

Andreas Jaeger <aj at suse dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
                 CC|aj at suse dot de           |

--- Comment #3 from Andreas Jaeger <aj at suse dot de> 2011-11-28 08:58:33 UTC ---
Information provided.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libc/13439] iconv and Qt work inproperly
  2011-11-25 17:10 [Bug libc/13439] New: iconv and Qt work inproperly wengxt at gmail dot com
                   ` (2 preceding siblings ...)
  2011-11-28  8:59 ` aj at suse dot de
@ 2011-12-18  2:11 ` drepper.fsp at gmail dot com
  2011-12-18  7:00 ` wengxt at gmail dot com
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: drepper.fsp at gmail dot com @ 2011-12-18  2:11 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=13439

Ulrich Drepper <drepper.fsp at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #4 from Ulrich Drepper <drepper.fsp at gmail dot com> 2011-12-18 02:11:26 UTC ---
That's the correct behavior.  If you want to convert a new string you have to
use iconv_close.  It would be absolutely wrong to reset the setting after every
iconv() call since this would make it impossible to convert a file/buffer in
pieces.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libc/13439] iconv and Qt work inproperly
  2011-11-25 17:10 [Bug libc/13439] New: iconv and Qt work inproperly wengxt at gmail dot com
                   ` (3 preceding siblings ...)
  2011-12-18  2:11 ` drepper.fsp at gmail dot com
@ 2011-12-18  7:00 ` wengxt at gmail dot com
  2011-12-21 23:48 ` drepper.fsp at gmail dot com
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: wengxt at gmail dot com @ 2011-12-18  7:00 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=13439

--- Comment #5 from Weng Xuetian <wengxt at gmail dot com> 2011-12-18 06:59:50 UTC ---
Is it supposed to like this? The code use iconv_open TWICE.

I support each of iconv_t have it's own state, but not affect each other, this
is not true any more? As you can see, it's true in 2.13.

If it's not true, it will break many library. Like I just use
iconv_open("UTF-16", "UTF-8") here, and another library use
iconv_open("UTF-16", "UTF-8") in another place, but I didn't aware, then it
will break.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libc/13439] iconv and Qt work inproperly
  2011-11-25 17:10 [Bug libc/13439] New: iconv and Qt work inproperly wengxt at gmail dot com
                   ` (4 preceding siblings ...)
  2011-12-18  7:00 ` wengxt at gmail dot com
@ 2011-12-21 23:48 ` drepper.fsp at gmail dot com
  2014-02-16 18:24 ` jackie.rosen at hushmail dot com
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: drepper.fsp at gmail dot com @ 2011-12-21 23:48 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=13439

--- Comment #6 from Ulrich Drepper <drepper.fsp at gmail dot com> 2011-12-21 23:48:13 UTC ---
I checked in a patch.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libc/13439] iconv and Qt work inproperly
  2011-11-25 17:10 [Bug libc/13439] New: iconv and Qt work inproperly wengxt at gmail dot com
                   ` (5 preceding siblings ...)
  2011-12-21 23:48 ` drepper.fsp at gmail dot com
@ 2014-02-16 18:24 ` jackie.rosen at hushmail dot com
  2014-05-28 19:43 ` schwab at sourceware dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jackie.rosen at hushmail dot com @ 2014-02-16 18:24 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=13439

Jackie Rosen <jackie.rosen at hushmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jackie.rosen at hushmail dot com

--- Comment #7 from Jackie Rosen <jackie.rosen at hushmail dot com> ---
*** Bug 260998 has been marked as a duplicate of this bug. ***
Seen from the domain http://volichat.com
Page where seen: http://volichat.com/adult-chat-rooms
Marked for reference. Resolved as fixed @bugzilla.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libc/13439] iconv and Qt work inproperly
  2011-11-25 17:10 [Bug libc/13439] New: iconv and Qt work inproperly wengxt at gmail dot com
                   ` (6 preceding siblings ...)
  2014-02-16 18:24 ` jackie.rosen at hushmail dot com
@ 2014-05-28 19:43 ` schwab at sourceware dot org
  2014-06-13 14:24 ` fweimer at redhat dot com
  2014-06-13 14:37 ` [Bug libc/13439] iconv_open incorrectly shares internal conversion state fweimer at redhat dot com
  9 siblings, 0 replies; 11+ messages in thread
From: schwab at sourceware dot org @ 2014-05-28 19:43 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=13439

Andreas Schwab <schwab at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|jackie.rosen at hushmail dot com   |

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libc/13439] iconv and Qt work inproperly
  2011-11-25 17:10 [Bug libc/13439] New: iconv and Qt work inproperly wengxt at gmail dot com
                   ` (7 preceding siblings ...)
  2014-05-28 19:43 ` schwab at sourceware dot org
@ 2014-06-13 14:24 ` fweimer at redhat dot com
  2014-06-13 14:37 ` [Bug libc/13439] iconv_open incorrectly shares internal conversion state fweimer at redhat dot com
  9 siblings, 0 replies; 11+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13 14:24 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=13439

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com
              Flags|                            |security-

--- Comment #8 from Florian Weimer <fweimer at redhat dot com> ---
This can result in data corruption in multi-threaded programs.  It does not
result in information leaks because only the endianness flag and no other data
is shared incorrectly.

Commit ee190f67cc00b958a667af75dc68f3fc21611c9f is the fix (but the commit
message is somewhat misleading).

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libc/13439] iconv_open incorrectly shares internal conversion state
  2011-11-25 17:10 [Bug libc/13439] New: iconv and Qt work inproperly wengxt at gmail dot com
                   ` (8 preceding siblings ...)
  2014-06-13 14:24 ` fweimer at redhat dot com
@ 2014-06-13 14:37 ` fweimer at redhat dot com
  9 siblings, 0 replies; 11+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13 14:37 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=13439

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|iconv and Qt work           |iconv_open incorrectly
                   |inproperly                  |shares internal conversion
                   |                            |state

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-06-13 14:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-25 17:10 [Bug libc/13439] New: iconv and Qt work inproperly wengxt at gmail dot com
2011-11-25 19:15 ` [Bug libc/13439] " aj at suse dot de
2011-11-25 21:31 ` wengxt at gmail dot com
2011-11-28  8:59 ` aj at suse dot de
2011-12-18  2:11 ` drepper.fsp at gmail dot com
2011-12-18  7:00 ` wengxt at gmail dot com
2011-12-21 23:48 ` drepper.fsp at gmail dot com
2014-02-16 18:24 ` jackie.rosen at hushmail dot com
2014-05-28 19:43 ` schwab at sourceware dot org
2014-06-13 14:24 ` fweimer at redhat dot com
2014-06-13 14:37 ` [Bug libc/13439] iconv_open incorrectly shares internal conversion state fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).