Project

General

Profile

Actions

Bug #6904

closed

collation: Fix expansion substitutions

Added by Garrett D'Amore about 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
2016-04-12
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
External Bug:

Description

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/d705af0fc9432eb9f2d7b98aade41c97bd080b5a#patch1

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.

Actions #1

Updated by Lauri Tirkkonen almost 7 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:

https://svnweb.freebsd.org/base?view=revision&revision=302916

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.

Actions #2

Updated by Yuri Pankov over 6 years ago

  • Category set to lib - userland libraries
  • Status changed from New to In Progress
  • Assignee set to Yuri Pankov
  • Difficulty changed from Medium to Bite-size
  • Tags deleted (needs-triage)
Actions #3

Updated by Yuri Pankov over 6 years ago

  • Subject changed from collation code fixes from dragonfly bsd to collation: Fix expansion substitutions
Actions #4

Updated by Electric Monk about 6 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit c8e8151746c31cffabceb6c8a47afa98f041f327

commit  c8e8151746c31cffabceb6c8a47afa98f041f327
Author: John Marino <draco@marino.st>
Date:   2017-03-28T04:12:07.000Z

    6904 collation: Fix expansion substitutions
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
    Approved by: Dan McDonald <danmcd@omniti.com>

Actions

Also available in: Atom PDF