public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/11009] `nl_langinfo_l (item, LC_GLOBAL_LOCALE)' crashes
       [not found] <bug-11009-131@http.sourceware.org/bugzilla/>
@ 2014-06-30 20:38 ` fweimer at redhat dot com
  0 siblings, 0 replies; 7+ messages in thread
From: fweimer at redhat dot com @ 2014-06-30 20:38 UTC (permalink / raw)
  To: glibc-bugs

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

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

* [Bug libc/11009] `nl_langinfo_l (item, LC_GLOBAL_LOCALE)' crashes
  2009-11-23 22:40 [Bug libc/11009] New: " ludo at gnu dot org
                   ` (4 preceding siblings ...)
  2009-11-23 23:48 ` drepper at redhat dot com
@ 2009-11-24  1:12 ` bruno at clisp dot org
  5 siblings, 0 replies; 7+ messages in thread
From: bruno at clisp dot org @ 2009-11-24  1:12 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From bruno at clisp dot org  2009-11-24 01:12 -------
(In reply to comment #3)
> If you want to query the global locale, why don't you just use
> nl_langinfo instead of nl_langinfo_l?

Note that the proposed

  nl_langinfo_l (item, LC_GLOBAL_LOCALE)

is not equivalent to

  nl_langinfo (item)

but rather to

  ({ locale_t old_thread_locale = uselocale (LC_GLOBAL_LOCALE);
     const char *value = nl_langinfo (item);
     uselocale (old_thread_locale);
     value;
  })

or to

  ({ locale_t global_locale = duplocale (LC_GLOBAL_LOCALE);
     const char *value = nl_langinfo_l (item, global_locale);
     freelocale (global_locale);
     value;
  })

But I agree with your evaluation that it is not essential to support
LC_GLOBAL_LOCALE arguments here (unlike in duplocale, see bug10969).


-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug libc/11009] `nl_langinfo_l (item, LC_GLOBAL_LOCALE)' crashes
  2009-11-23 22:40 [Bug libc/11009] New: " ludo at gnu dot org
                   ` (3 preceding siblings ...)
  2009-11-23 23:44 ` ludo at gnu dot org
@ 2009-11-23 23:48 ` drepper at redhat dot com
  2009-11-24  1:12 ` bruno at clisp dot org
  5 siblings, 0 replies; 7+ messages in thread
From: drepper at redhat dot com @ 2009-11-23 23:48 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2009-11-23 23:48 -------
(In reply to comment #4)
> It's sometimes useful to have code that treats `LC_GLOBAL_LOCALE' like any other
> locale object.

It's complete nonsense in this case and prohibitively expensive in some other
cases.  I won't change this.  And since the specification is written after the
glibc implementation it has to be adjusted.



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |WONTFIX


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug libc/11009] `nl_langinfo_l (item, LC_GLOBAL_LOCALE)' crashes
  2009-11-23 22:40 [Bug libc/11009] New: " ludo at gnu dot org
                   ` (2 preceding siblings ...)
  2009-11-23 23:01 ` jakub at redhat dot com
@ 2009-11-23 23:44 ` ludo at gnu dot org
  2009-11-23 23:48 ` drepper at redhat dot com
  2009-11-24  1:12 ` bruno at clisp dot org
  5 siblings, 0 replies; 7+ messages in thread
From: ludo at gnu dot org @ 2009-11-23 23:44 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From ludo at gnu dot org  2009-11-23 23:44 -------
It's sometimes useful to have code that treats `LC_GLOBAL_LOCALE' like any other
locale object.

The wording at
http://www.opengroup.org/onlinepubs/9699919799/basedefs/locale.h.html suggests
that it's a "locale object descriptor", which should be usable with any function
that takes a locale object descriptor, not just uselocale(3).

-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug libc/11009] `nl_langinfo_l (item, LC_GLOBAL_LOCALE)' crashes
  2009-11-23 22:40 [Bug libc/11009] New: " ludo at gnu dot org
  2009-11-23 22:42 ` [Bug libc/11009] " ludo at gnu dot org
  2009-11-23 22:47 ` drepper at redhat dot com
@ 2009-11-23 23:01 ` jakub at redhat dot com
  2009-11-23 23:44 ` ludo at gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at redhat dot com @ 2009-11-23 23:01 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From jakub at redhat dot com  2009-11-23 23:01 -------
Note that locale.h description says that LC_GLOBAL_LOCALE is a special value for
use by the uselocale function.  There is nothing that says it can be used in
other functions.  If you want to query the global locale, why don't you just use
nl_langinfo instead of nl_langinfo_l?
You'd be requesting that isdigit_l (x, LC_GLOBAL_LOCALE) works next time, all
those macros/inclines then would need to special case that value.

-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug libc/11009] `nl_langinfo_l (item, LC_GLOBAL_LOCALE)' crashes
  2009-11-23 22:40 [Bug libc/11009] New: " ludo at gnu dot org
  2009-11-23 22:42 ` [Bug libc/11009] " ludo at gnu dot org
@ 2009-11-23 22:47 ` drepper at redhat dot com
  2009-11-23 23:01 ` jakub at redhat dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: drepper at redhat dot com @ 2009-11-23 22:47 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2009-11-23 22:47 -------
Not everything that is possible to do should be done.  Why on earth is this needed?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug libc/11009] `nl_langinfo_l (item, LC_GLOBAL_LOCALE)' crashes
  2009-11-23 22:40 [Bug libc/11009] New: " ludo at gnu dot org
@ 2009-11-23 22:42 ` ludo at gnu dot org
  2009-11-23 22:47 ` drepper at redhat dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ludo at gnu dot org @ 2009-11-23 22:42 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From ludo at gnu dot org  2009-11-23 22:41 -------
Created an attachment (id=4412)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4412&action=view)
Test case.


-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

end of thread, other threads:[~2014-06-30 20:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-11009-131@http.sourceware.org/bugzilla/>
2014-06-30 20:38 ` [Bug libc/11009] `nl_langinfo_l (item, LC_GLOBAL_LOCALE)' crashes fweimer at redhat dot com
2009-11-23 22:40 [Bug libc/11009] New: " ludo at gnu dot org
2009-11-23 22:42 ` [Bug libc/11009] " ludo at gnu dot org
2009-11-23 22:47 ` drepper at redhat dot com
2009-11-23 23:01 ` jakub at redhat dot com
2009-11-23 23:44 ` ludo at gnu dot org
2009-11-23 23:48 ` drepper at redhat dot com
2009-11-24  1:12 ` bruno at clisp dot org

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).