HomeFreeBSD

libc: Fix a few bugs in the xlocale collation code.

Description

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

Details

Committed
markjJan 9 2020, 8:49 PM
Reviewer
cem
Differential Revision
D23109: libc: Fix a few bugs in the xlocale collation code.
Parents
rS356568: MFC r355566:
Branches
Unknown
Tags
Unknown