public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug localedata/13691] New: Assertion with vi_VN.tcvn locale
@ 2012-02-14 14:58 matz at suse dot de
  2012-02-24 17:19 ` [Bug localedata/13691] " tuliom at linux dot vnet.ibm.com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: matz at suse dot de @ 2012-02-14 14:58 UTC (permalink / raw)
  To: glibc-bugs

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

             Bug #: 13691
           Summary: Assertion with vi_VN.tcvn locale
           Product: glibc
           Version: 2.15
            Status: NEW
          Severity: normal
          Priority: P2
         Component: localedata
        AssignedTo: libc-locales@sources.redhat.com
        ReportedBy: matz@suse.de
    Classification: Unclassified


The following program result in an assertion failure in __mbsnrtowcs:

% cat bug.c
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <locale.h>
#include <wchar.h>

int main()
{
  const char * string = "Z";
  size_t len;
  wchar_t ignore[1];
  const char *str2 = string;
  const char *strend = string + 1;
  mbstate_t ps;
  printf("Locale: %s\n", setlocale(LC_ALL, "vi_VN.tcvn"));
  memset (&ps, '\0', sizeof (ps));
  while (str2 != NULL && str2 < strend)
    if (mbsnrtowcs (ignore, &str2, strend - str2, 1, &ps) == (size_t) -1)
      break;
  return 0;
}

# ./elf/ld.so --library-path . ./a.out
Locale: vi_VN.tcvn
a.out: mbsnrtowcs.c:124: __mbsnrtowcs: Assertion `result > 0' failed.
Aborted

The reason is that the gconv loop doesn't make progress.  I.e. somewhere
there's a problem in ./iconvdata/tcvn5712-1.c .  The assert is here in
wcsmbs/mbsnrtowcs.c :

      status = DL_CALL_FCT (fct,
                            (towc, &data, (const unsigned char **) src,
                             srcend, NULL, &dummy, 0, 1));
      result = (wchar_t *) data.__outbuf - dst;
      /* We have to determine whether the last character converted
         is the NUL character.  */
      if ((status == __GCONV_OK || status == __GCONV_EMPTY_INPUT)
          && (assert (result > 0),

status is __GCONV_EMPTY_INPUT, but nothing is written to the output buffer
(and it's not incremented).

I _think_ this is because of the handling of the buffered character in
state->__count.  After the iconv call above data.__state->__count is
720, which is 90 << 3, which is the value of the "Z" character.  So it's
buffered, but it doesn't seem to be emitted to outbuf when the input
comes to an end.

-- 
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] 7+ messages in thread

* [Bug localedata/13691] Assertion with vi_VN.tcvn locale
  2012-02-14 14:58 [Bug localedata/13691] New: Assertion with vi_VN.tcvn locale matz at suse dot de
@ 2012-02-24 17:19 ` tuliom at linux dot vnet.ibm.com
  2012-03-06 19:35 ` tuliom at linux dot vnet.ibm.com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: tuliom at linux dot vnet.ibm.com @ 2012-02-24 17:19 UTC (permalink / raw)
  To: glibc-bugs

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

Tulio Magno Quites Machado Filho <tuliom at linux dot vnet.ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |libc-locales at sources dot
                   |                            |redhat.com, rsa at us dot
                   |                            |ibm.com, tuliom at linux
                   |                            |dot vnet.ibm.com
         AssignedTo|libc-locales at sources dot |tuliom at linux dot
                   |redhat.com                  |vnet.ibm.com

-- 
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] 7+ messages in thread

* [Bug localedata/13691] Assertion with vi_VN.tcvn locale
  2012-02-14 14:58 [Bug localedata/13691] New: Assertion with vi_VN.tcvn locale matz at suse dot de
  2012-02-24 17:19 ` [Bug localedata/13691] " tuliom at linux dot vnet.ibm.com
@ 2012-03-06 19:35 ` tuliom at linux dot vnet.ibm.com
  2012-03-30 10:53 ` aj at suse dot de
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: tuliom at linux dot vnet.ibm.com @ 2012-03-06 19:35 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #1 from Tulio Magno Quites Machado Filho <tuliom at linux dot vnet.ibm.com> 2012-03-06 19:35:08 UTC ---
Patch sent for review:
http://sourceware.org/ml/libc-alpha/2012-03/msg00123.html

-- 
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] 7+ messages in thread

* [Bug localedata/13691] Assertion with vi_VN.tcvn locale
  2012-02-14 14:58 [Bug localedata/13691] New: Assertion with vi_VN.tcvn locale matz at suse dot de
  2012-02-24 17:19 ` [Bug localedata/13691] " tuliom at linux dot vnet.ibm.com
  2012-03-06 19:35 ` tuliom at linux dot vnet.ibm.com
@ 2012-03-30 10:53 ` aj at suse dot de
  2012-04-03 12:18 ` tuliom at linux dot vnet.ibm.com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: aj at suse dot de @ 2012-03-30 10:53 UTC (permalink / raw)
  To: glibc-bugs

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

Andreas Jaeger <aj at suse dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
                 CC|                            |aj at suse dot de
         Resolution|                            |FIXED

--- Comment #2 from Andreas Jaeger <aj at suse dot de> 2012-03-30 08:46:55 UTC ---
Fixed in git head with commit e64d2de526d8cfa2908e08892a534316a0bddf5f

-- 
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] 7+ messages in thread

* [Bug localedata/13691] Assertion with vi_VN.tcvn locale
  2012-02-14 14:58 [Bug localedata/13691] New: Assertion with vi_VN.tcvn locale matz at suse dot de
                   ` (2 preceding siblings ...)
  2012-03-30 10:53 ` aj at suse dot de
@ 2012-04-03 12:18 ` tuliom at linux dot vnet.ibm.com
  2012-05-21  7:27 ` aj at suse dot de
  2014-06-27  7:18 ` fweimer at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: tuliom at linux dot vnet.ibm.com @ 2012-04-03 12:18 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #3 from Tulio Magno Quites Machado Filho <tuliom at linux dot vnet.ibm.com> 2012-04-03 12:17:29 UTC ---
A new commit is available to fix a bug in the previous commit:
39c59c35723120c32dc42dde4115bba92305179f

-- 
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] 7+ messages in thread

* [Bug localedata/13691] Assertion with vi_VN.tcvn locale
  2012-02-14 14:58 [Bug localedata/13691] New: Assertion with vi_VN.tcvn locale matz at suse dot de
                   ` (3 preceding siblings ...)
  2012-04-03 12:18 ` tuliom at linux dot vnet.ibm.com
@ 2012-05-21  7:27 ` aj at suse dot de
  2014-06-27  7:18 ` fweimer at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: aj at suse dot de @ 2012-05-21  7:27 UTC (permalink / raw)
  To: glibc-bugs

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

Andreas Jaeger <aj at suse dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |WONTFIX

--- Comment #4 from Andreas Jaeger <aj at suse dot de> 2012-05-21 07:26:51 UTC ---
As discussed on libc-alpha (thread starts here
http://sourceware.org/ml/libc-alpha/2012-05/msg00736.html), this patch causes a
regression, we cannot really support vi_VN.tcvn in glibc and will instead
remove it from the list of supported languages.

Thus, I'm marking this bug as wontfix.

-- 
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] 7+ messages in thread

* [Bug localedata/13691] Assertion with vi_VN.tcvn locale
  2012-02-14 14:58 [Bug localedata/13691] New: Assertion with vi_VN.tcvn locale matz at suse dot de
                   ` (4 preceding siblings ...)
  2012-05-21  7:27 ` aj at suse dot de
@ 2014-06-27  7:18 ` fweimer at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: fweimer at redhat dot com @ 2014-06-27  7:18 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

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


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

end of thread, other threads:[~2014-06-27  7:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-14 14:58 [Bug localedata/13691] New: Assertion with vi_VN.tcvn locale matz at suse dot de
2012-02-24 17:19 ` [Bug localedata/13691] " tuliom at linux dot vnet.ibm.com
2012-03-06 19:35 ` tuliom at linux dot vnet.ibm.com
2012-03-30 10:53 ` aj at suse dot de
2012-04-03 12:18 ` tuliom at linux dot vnet.ibm.com
2012-05-21  7:27 ` aj at suse dot de
2014-06-27  7:18 ` 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).