public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/16915] New: nl_langinfo doesn't work with static linking
@ 2014-05-06 21:07 aurelien at aurel32 dot net
  2014-05-06 21:43 ` [Bug libc/16915] " aurelien at aurel32 dot net
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: aurelien at aurel32 dot net @ 2014-05-06 21:07 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 16915
           Summary: nl_langinfo doesn't work with static linking
           Product: glibc
           Version: 2.13
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: aurelien at aurel32 dot net
                CC: drepper.fsp at gmail dot com

When used in statically linked binaries, nl_langinfo() does not work for some
categories, as it can be seen with a small example like that:

#include <stdio.h>
#include <locale.h> 
#include <langinfo.h> 

int main(void)
{
  setlocale (LC_ALL, "fr_FR.UTF-8");
  printf("%s\n",nl_langinfo(DAY_2));
  return 0;
}

Such a code returns "Monday" instead of "lundi" when compiled dynamically.

A patch is available on
http://sourceware.org/ml/libc-alpha/2014-05/msg00134.html

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


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

* [Bug libc/16915] nl_langinfo doesn't work with static linking
  2014-05-06 21:07 [Bug libc/16915] New: nl_langinfo doesn't work with static linking aurelien at aurel32 dot net
@ 2014-05-06 21:43 ` aurelien at aurel32 dot net
  2014-05-20 16:49 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: aurelien at aurel32 dot net @ 2014-05-06 21:43 UTC (permalink / raw)
  To: glibc-bugs

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

Aurelien Jarno <aurelien at aurel32 dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at sourceware dot org   |aurelien at aurel32 dot net

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


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

* [Bug libc/16915] nl_langinfo doesn't work with static linking
  2014-05-06 21:07 [Bug libc/16915] New: nl_langinfo doesn't work with static linking aurelien at aurel32 dot net
  2014-05-06 21:43 ` [Bug libc/16915] " aurelien at aurel32 dot net
@ 2014-05-20 16:49 ` cvs-commit at gcc dot gnu.org
  2014-05-20 16:50 ` aurelien at aurel32 dot net
  2014-06-12 19:25 ` fweimer at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2014-05-20 16:49 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  4406c41c1d6088abf01c216e49700cd3f8f01fcc (commit)
       via  ae75a883f2eb312165d1e1f423cea320f3c92ef5 (commit)
      from  de9d8f2098caeb19684710a3c0774f4fe38a5e2c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4406c41c1d6088abf01c216e49700cd3f8f01fcc

commit 4406c41c1d6088abf01c216e49700cd3f8f01fcc
Author: Aurelien Jarno <aurelien@aurel32.net>
Date:   Tue May 20 14:41:44 2014 +0200

    Fix strtold on 32-bit sparc (and probably others) (BZ #16965)

    This patch fixes an issue observed running the tst-strtod-round test on
    32 bit sparc. In some conditions, strtold calls round_and_return, which in
    turn calls __mpn_rshift with cnt = 0, while stdlib/rshift.c explicitly says
    that cnts should satisfy 0 < CNT < BITS_PER_MP_LIMB. In this case, the code
    end up doing a logical shift right of the same amount than the register,
    which is undefined in the C standard.

    Due to this bug, 32-bit sparc does not correctly convert the value
    "0x1p-16446", but it is likely that other architectures are also
    affected for other input values.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ae75a883f2eb312165d1e1f423cea320f3c92ef5

commit ae75a883f2eb312165d1e1f423cea320f3c92ef5
Author: Aurelien Jarno <aurelien@aurel32.net>
Date:   Fri May 16 00:06:54 2014 +0200

    fix nl_langinfo with static linking (BZ #16915)

    For static linking the locale code avoids linking code and data for
    unused categories. However for nl_langinfo we know only at runtime which
    categories are used, so direct reference to every nl_current_CATEGORY
    symbol should be done.

    This was broken by commit bc3e1c127392da88d0c8bf2ae728147982a3d1bc where
    nl_langinfo_l and nl_langinfo have been merged and some code has been
    lost in the process.

    In order to detect locales issues with static linking, compile a version
    of tst-langinfo with static linking.

    Note: this is Debian bug#747103 reported by Raphael
<raphael.astier@eliot-sa.com>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                        |   17 +++++++++++++++++
 NEWS                             |    3 ++-
 locale/nl_langinfo_l.c           |   15 +++++++++++++++
 localedata/Makefile              |   13 ++++++++++---
 localedata/tst-langinfo-static.c |    1 +
 localedata/tst-langinfo.sh       |    3 +--
 stdlib/strtod_l.c                |   11 ++++++++---
 7 files changed, 54 insertions(+), 9 deletions(-)
 create mode 100644 localedata/tst-langinfo-static.c

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


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

* [Bug libc/16915] nl_langinfo doesn't work with static linking
  2014-05-06 21:07 [Bug libc/16915] New: nl_langinfo doesn't work with static linking aurelien at aurel32 dot net
  2014-05-06 21:43 ` [Bug libc/16915] " aurelien at aurel32 dot net
  2014-05-20 16:49 ` cvs-commit at gcc dot gnu.org
@ 2014-05-20 16:50 ` aurelien at aurel32 dot net
  2014-06-12 19:25 ` fweimer at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: aurelien at aurel32 dot net @ 2014-05-20 16:50 UTC (permalink / raw)
  To: glibc-bugs

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

Aurelien Jarno <aurelien at aurel32 dot net> changed:

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

--- Comment #2 from Aurelien Jarno <aurelien at aurel32 dot net> ---
Fix in commit ae75a883f2eb312165d1e1f423cea320f3c92ef5

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


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

* [Bug libc/16915] nl_langinfo doesn't work with static linking
  2014-05-06 21:07 [Bug libc/16915] New: nl_langinfo doesn't work with static linking aurelien at aurel32 dot net
                   ` (2 preceding siblings ...)
  2014-05-20 16:50 ` aurelien at aurel32 dot net
@ 2014-06-12 19:25 ` fweimer at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: fweimer at redhat dot com @ 2014-06-12 19:25 UTC (permalink / raw)
  To: glibc-bugs

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

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

end of thread, other threads:[~2014-06-12 19:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-06 21:07 [Bug libc/16915] New: nl_langinfo doesn't work with static linking aurelien at aurel32 dot net
2014-05-06 21:43 ` [Bug libc/16915] " aurelien at aurel32 dot net
2014-05-20 16:49 ` cvs-commit at gcc dot gnu.org
2014-05-20 16:50 ` aurelien at aurel32 dot net
2014-06-12 19:25 ` 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).