Actions
Bug #8362
closedlibc: install_legacy() overwrites __runetype, __maplower, and __mapupper for _DefaultRuneLocale
Start date:
2017-06-10
Due date:
% Done:
100%
Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
Description
Currently __ctype_mask, __translower, and __transupper are defined as pointers to __runetype, __maplower, and __mapupper, respectively, in _DefaultRuneLocale, so once we call setlocale() with any UTF-8 locale as argument (which in turn calls install_legacy()), the contents of _DefaultRuneLocale are overwritten with those from UTF-8 locale.
This breaks character handling functions if we then switch back to C locale.
We should simply define those as separate objects, and initialize them to be the same as corresponding members of _DefaultRuneLocale, initially.
Updated by Electric Monk about 5 years ago
- Status changed from In Progress to Closed
- % Done changed from 50 to 100
git commit 62f1951acad6be879e0d45536ba1ead95e7eb3f0
commit 62f1951acad6be879e0d45536ba1ead95e7eb3f0 Author: Yuri Pankov <yuri.pankov@nexenta.com> Date: 2017-06-14T17:29:35.000Z 8362 libc: install_legacy() overwrites __runetype, __maplower, and __mapupper for _DefaultRuneLocale Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Igor Kozhukhov <igor@dilos.org> Reviewed by: Garrett D'Amore <garrett@damore.org> Approved by: Robert Mustacchi <rm@joyent.com>
Updated by Electric Monk about 5 years ago
git commit 415a310d21931e2c92758fb1bbf6625e01ee1472
commit 415a310d21931e2c92758fb1bbf6625e01ee1472 Author: Robert Mustacchi <rm@joyent.com> Date: 2017-06-16T00:55:31.000Z 8362 libc: install_legacy() overwrites __runetype, __maplower, and __mapupper for _DefaultRuneLocale (breaks copy relocs)
Updated by Yuri Pankov about 5 years ago
- Status changed from Closed to In Progress
- % Done changed from 100 to 50
Updated by Electric Monk about 5 years ago
- Status changed from In Progress to Closed
- % Done changed from 50 to 100
git commit 6ddde3c29e802380fc0318df29c80e7820847f48
commit 6ddde3c29e802380fc0318df29c80e7820847f48 Author: Yuri Pankov <yuri.pankov@nexenta.com> Date: 2017-06-20T16:46:13.000Z 8362 libc: install_legacy() overwrites __runetype, __maplower, and __mapupper for _DefaultRuneLocale Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Igor Kozhukhov <igor@dilos.org> Approved by: Robert Mustacchi <rm@joyent.com>
Actions