Summary: | [libc] setlocale(LC_COLLATE, "...") causes segmentation fault after certain number of calls | ||
---|---|---|---|
Product: | Base System | Reporter: | Koichi Murase <myoga.murase> |
Component: | bin | Assignee: | Mark Johnston <markj> |
Status: | Closed FIXED | ||
Severity: | Affects Some People | CC: | cem, markj, myoga.murase |
Priority: | --- | ||
Version: | 12.1-RELEASE | ||
Hardware: | Any | ||
OS: | Any |
Description
Koichi Murase
2020-01-08 18:30:57 UTC
I suspect you're correct. There's another bug nearby, where the return value of mmap() is checked for NULL rather than MAP_FAILED. This should be fixed by https://reviews.freebsd.org/D23109 A commit references this bug: Author: markj Date: Thu Jan 9 20:49:26 UTC 2020 New revision: 356569 URL: https://svnweb.freebsd.org/changeset/base/356569 Log: libc: Fix a few bugs in the xlocale collation code. - Fix checks for mmap() failures. [1] - Set the "map" and "maplen" fields of struct xlocale_collate so that the table destructor actually does something. - Free an already-mapped collation file before loading a new one into the global table. - Harmonize the prototype and definition of __collate_load_tables_l() by adding the "static" qualifier to the latter. PR: 243195 Reported by: cem [1] Reviewed by: cem, yuripv MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23109 Changes: head/lib/libc/locale/collate.c head/lib/libc/locale/rune.c A commit references this bug: Author: markj Date: Thu Jan 16 00:26:53 UTC 2020 New revision: 356769 URL: https://svnweb.freebsd.org/changeset/base/356769 Log: MFC r356569: libc: Fix a few bugs in the xlocale collation code. PR: 243195 Changes: _U stable/12/ stable/12/lib/libc/locale/collate.c stable/12/lib/libc/locale/rune.c Thank you for the report. |