collation: Fix expansion substitutions
collate.c has some issues that John Marino fixed in DragonflyBSD -- we need to review, adjust, and integrate these fixes.
This needs to be fixed before the new CLDR data is integrated. Probably we should take the wscoll.c changes too.
Updated by Lauri Tirkkonen over 4 years ago
Original fix causes a segfault in strxfrm() with iso-8859-5 locales. After discussions with Baptiste Daroussin of FreeBSD and John Marino of DragonFly, Baptiste came up with the following patch for FreeBSD:
which fixes the segfault for them. I have code that imports these changes, as well as two tests from FreeBSD, but unfortunately on illumos the above patch causes an infinite loop in strcoll()/wcscoll() (as did my initial attempt, which briefly appeared in both BSDs mentioned above).
The original code from DragonFly (linked in the description) doesn't make complete sense; the "*state = NULL;" branch is never taken with the current check, so this still needs further investigation.
Updated by Electric Monk over 3 years ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
commit c8e8151746c31cffabceb6c8a47afa98f041f327 Author: John Marino <email@example.com> Date: 2017-03-28T04:12:07.000Z 6904 collation: Fix expansion substitutions Reviewed by: Robert Mustacchi <firstname.lastname@example.org> Reviewed by: Yuri Pankov <email@example.com> Approved by: Dan McDonald <firstname.lastname@example.org>