Sourceware Bugzilla – Attachment 10425 Details for
Bug 10871
'mon' array should contain both nominative and genitive cases
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Correct the size of _nl_value_type_LC_... arrays (v9)
0001-Correct-the-size-of-_nl_value_type_LC_.-arrays.patch (text/plain), 2.04 KB, created by
Rafal Luzynski
on 2017-09-19 10:04:19 UTC
(
hide
)
Description:
Correct the size of _nl_value_type_LC_... arrays (v9)
Filename:
MIME Type:
Creator:
Rafal Luzynski
Created:
2017-09-19 10:04:19 UTC
Size:
2.04 KB
patch
obsolete
>From fffaf79fbf1d5345e3ea566fb55d362d2d6bb29d Mon Sep 17 00:00:00 2001 >From: Rafal Luzynski <digitalfreak@lingonborough.com> >Date: Wed, 12 Jul 2017 01:32:33 +0200 >Subject: [PATCH 1/6] Correct the size of _nl_value_type_LC_... arrays. > >There were several problems with checking the array size in the past, >for example BZ#356, caused by incorrectly assuming that every locale >token represents one element. In fact, if a token represented >a subarray, for example an array of month names or characters category >and it appeared at the end of the array the compiler assumed that >the array ends just after the first element of the subarray. >Workarounds used in the past was to skip some categories while testing, >for example LC_CTYPE. Now when we are about to add alternative month >names to LC_TIME (BZ#10871) this will fail again. > > * locale/loadlocale.c: Correct size of > _nl_value_type_LC_<category> arrays. >--- > ChangeLog | 5 +++++ > locale/loadlocale.c | 3 ++- > 2 files changed, 7 insertions(+), 1 deletion(-) > >diff --git a/ChangeLog b/ChangeLog >index 25b05f2..3b8e6c5 100644 >--- a/ChangeLog >+++ b/ChangeLog >@@ -1,3 +1,8 @@ >+2017-09-19 Rafal Luzynski <digitalfreak@lingonborough.com> >+ >+ * locale/loadlocale.c: Correct size of >+ _nl_value_type_LC_<category> arrays. >+ > 2017-09-19 Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com> > > * sysdeps/powerpc/powerpc64/power8/memset.S: Avoid misaligned stores. >diff --git a/locale/loadlocale.c b/locale/loadlocale.c >index 2bdb39b..cdc3dd4 100644 >--- a/locale/loadlocale.c >+++ b/locale/loadlocale.c >@@ -45,7 +45,8 @@ static const size_t _nl_category_num_items[] = > #define NO_PAREN(arg, rest...) arg, ##rest > > #define DEFINE_CATEGORY(category, category_name, items, a) \ >-static const enum value_type _nl_value_type_##category[] = { NO_PAREN items }; >+static const enum value_type _nl_value_type_##category \ >+ [_NL_ITEM_INDEX (_NL_NUM_##category)] = { NO_PAREN items }; > #define DEFINE_ELEMENT(element, element_name, optstd, type, rest...) \ > [_NL_ITEM_INDEX (element)] = type, > #include "categories.def" >-- >2.7.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 10871
:
8795
|
8874
|
8875
|
8876
|
8877
|
8878
|
8879
|
8880
|
9122
|
9123
|
9124
|
9125
|
9126
|
9127
|
9569
|
9570
|
9571
|
9572
|
9573
|
9574
|
9575
|
9576
|
9577
|
9578
|
9579
|
9595
|
9596
|
9597
|
9598
|
9599
|
9709
|
9710
|
9711
|
9712
|
9713
|
9714
|
9715
|
9716
|
9717
|
9718
|
9719
|
9720
|
9721
|
9908
|
9909
|
9910
|
9911
|
9912
|
9913
|
9914
|
9915
|
9916
|
9917
|
9918
|
9919
|
10063
|
10064
|
10065
|
10225
|
10226
|
10227
|
10228
|
10229
|
10230
|
10231
| 10425 |
10426
|
10427
|
10428
|
10429
|
10430
|
10592
|
10593
|
10594
|
10595
|
10596
|
10597
|
10598
|
10599
|
10600
|
10601
|
10602
|
10731
|
10732
|
10733
|
10734
|
10735
|
10736
|
10737
|
10738
|
10739
|
10740
|
10741
|
10742