Re: [PATCH] Gracefully handle incompatible locale data

2015-10-28 Thread Carlos O'Donell
On 10/27/2015 11:30 AM, Samuel Thibault wrote: > Hello, > > Ludovic Courtès, le Tue 22 Sep 2015 17:27:55 +0200, a écrit : >> loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof >> (_nl_value_type_LC_COLLATE) / sizeof (_nl_value_type_LC_COLLATE[0]))' failed. >> >> This patch

Re: [PATCH] Gracefully handle incompatible locale data

2015-10-27 Thread Ludovic Courtès
Samuel Thibault skribis: > Ludovic Courtès, le Tue 22 Sep 2015 17:27:55 +0200, a écrit : >> loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof >> (_nl_value_type_LC_COLLATE) / sizeof (_nl_value_type_LC_COLLATE[0]))' failed. >> >> This patch changes

Re: [PATCH] Gracefully handle incompatible locale data

2015-10-27 Thread Samuel Thibault
Hello, Ludovic Courtès, le Tue 22 Sep 2015 17:27:55 +0200, a écrit : > loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof > (_nl_value_type_LC_COLLATE) / sizeof (_nl_value_type_LC_COLLATE[0]))' failed. > > This patch changes such conditions to return EINVAL instead of

Re: [PATCH] Gracefully handle incompatible locale data

2015-10-27 Thread Carlos O'Donell
On 10/13/2015 10:45 AM, Ludovic Courtès wrote: >> - What does localedef --list-archive return? >> >> - The new LC_COLLATE format will make it's way into the binary locale >> archive >> and that means glibc can't read the locale-archive? Does it fail? exit >> code? > > The patch does not

Re: [PATCH] Gracefully handle incompatible locale data

2015-10-13 Thread Allan McRae
On 29/09/15 06:54, Carlos O'Donell wrote: > On 09/26/2015 06:24 AM, Ludovic Courtès wrote: >> Furthermore, the function in question returns EINVAL in other similar >> cases–e.g., when libc 2.22 loads LC_COLLATE data from libc 2.21. > > If you change this particular case to EINVAL, what does the

Re: [PATCH] Gracefully handle incompatible locale data

2015-10-13 Thread Ludovic Courtès
Allan McRae skribis: > On 29/09/15 06:54, Carlos O'Donell wrote: >> On 09/26/2015 06:24 AM, Ludovic Courtès wrote: >>> Furthermore, the function in question returns EINVAL in other similar >>> cases–e.g., when libc 2.22 loads LC_COLLATE data from libc 2.21. >> >> If you

Re: [PATCH] Gracefully handle incompatible locale data

2015-10-13 Thread Carlos O'Donell
On 10/12/2015 08:49 PM, Allan McRae wrote: > On 29/09/15 06:54, Carlos O'Donell wrote: >> On 09/26/2015 06:24 AM, Ludovic Courtès wrote: >>> Furthermore, the function in question returns EINVAL in other similar >>> cases–e.g., when libc 2.22 loads LC_COLLATE data from libc 2.21. >> >> If you

Re: [PATCH] Gracefully handle incompatible locale data

2015-10-13 Thread Carlos O'Donell
On 09/29/2015 04:08 AM, Ludovic Courtès wrote: > "Carlos O'Donell" skribis: > >> On 09/26/2015 06:24 AM, Ludovic Courtès wrote: >>> Furthermore, the function in question returns EINVAL in other similar >>> cases–e.g., when libc 2.22 loads LC_COLLATE data from libc 2.21. >> >>

Re: [PATCH] Gracefully handle incompatible locale data

2015-10-13 Thread Ludovic Courtès
"Carlos O'Donell" skribis: > On 09/29/2015 04:08 AM, Ludovic Courtès wrote: >> "Carlos O'Donell" skribis: [...] >> Apart from that, ‘localedef --list-archive’ simply opens the locale >> archive (typically /usr/lib/locale/locale-archive, regardless of the

Re: [PATCH] Gracefully handle incompatible locale data

2015-10-08 Thread Ludovic Courtès
Hello! A friendly ping so the discussion does not die out. :-) https://sourceware.org/ml/libc-alpha/2015-09/threads.html#00575 https://sourceware.org/ml/libc-alpha/2015-09/msg00727.html TIA, Ludo’.

Re: [PATCH] Gracefully handle incompatible locale data

2015-09-26 Thread Ludovic Courtès
"Carlos O'Donell" skribis: > Despite Roland saying "LGTM", I think this is not a good change. > > Firstly, it's not the community consensus as Ondrej is pointing out. > > https://sourceware.org/glibc/wiki/Style_and_Conventions#Error_Handling “Assertions are for internal

Re: [PATCH] Gracefully handle incompatible locale data

2015-09-25 Thread Carlos O'Donell
On 09/24/2015 12:12 PM, Ludovic Courtès wrote: > Ondřej, I think we have been miscommunicating. > > I noticed that a program linked against 2.21 or earlier would abort with > an assertion failure when it stumbles upon 2.22 locale data. > > All the patch tries to do is change the abort to EINVAL

Re: [PATCH] Gracefully handle incompatible locale data

2015-09-24 Thread Ludovic Courtès
Ondřej, I think we have been miscommunicating. I noticed that a program linked against 2.21 or earlier would abort with an assertion failure when it stumbles upon 2.22 locale data. All the patch tries to do is change the abort to EINVAL (and skip locale data) when that happens. I’m not claiming

Re: [PATCH] Gracefully handle incompatible locale data

2015-09-23 Thread Andreas Schwab
Andreas Schwab writes: > What about the other assertion? Ignore that. This one is a real internal consistency check. Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something

Re: [PATCH] Gracefully handle incompatible locale data

2015-09-23 Thread Andreas Schwab
l...@gnu.org (Ludovic Courtès) writes: > diff --git a/locale/loadlocale.c b/locale/loadlocale.c > index fdba6e9..e04e720 100644 > --- a/locale/loadlocale.c > +++ b/locale/loadlocale.c > @@ -122,8 +122,9 @@ _nl_intern_locale_data (int category, const void *data, > size_t datasize) > { >

Re: [PATCH] Gracefully handle incompatible locale data

2015-09-23 Thread Ludovic Courtès
Ondřej Bílka skribis: > On Tue, Sep 22, 2015 at 11:22:40PM +0200, Ludovic Courtès wrote: >> Ondřej Bílka skribis: >> >> > On Tue, Sep 22, 2015 at 05:27:55PM +0200, Ludovic Courtès wrote: >> >> With libc 2.22 people are starting to realize that libc does not

Re: [PATCH] Gracefully handle incompatible locale data

2015-09-22 Thread Ondřej Bílka
On Tue, Sep 22, 2015 at 11:22:40PM +0200, Ludovic Courtès wrote: > Ondřej Bílka skribis: > > > On Tue, Sep 22, 2015 at 05:27:55PM +0200, Ludovic Courtès wrote: > >> With libc 2.22 people are starting to realize that libc does not > >> guarantee that it can load locale data

[PATCH] Gracefully handle incompatible locale data

2015-09-22 Thread Ludovic Courtès
With libc 2.22 people are starting to realize that libc does not guarantee that it can load locale data built with another libc version, but they learn it the hard way: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_COLLATE) / sizeof