GNU bug report logs - #15527
Failing test spencer1-locale for grep 2.14 on Solaris

Previous Next

Package: grep;

Reported by: Dagobert Michelsen <dam <at> opencsw.org>

Date: Fri, 4 Oct 2013 14:41:02 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Meyering <jim <at> meyering.net>
To: Dagobert Michelsen <dam <at> opencsw.org>, Paul Eggert <eggert <at> cs.ucla.edu>,  Aharon Robbins <arnold <at> skeeve.com>
Cc: 15527 <at> debbugs.gnu.org
Subject: bug#15527: Failing test spencer1-locale for grep 2.14 on Solaris
Date: Tue, 15 Oct 2013 21:48:48 -0700
close 15527
thanks

Thanks, Dagobert.
I have reproduced the problem with stock grep-2.14.  On this system:
  SunOS unstable10s 5.10 Generic_147440-27 sun4v sparc
SUNW,SPARC-Enterprise-T5220,
this command prints nothing and exits with status 1:

  printf 'a\002c\n' | LC_COLLATE=ru_RU.KOI8-R ./grep -E "$(printf
'a[\001-\003]?c')"

Why? Debugging showed that deep in the guts of lib/regcomp.c, we would
call wcscoll and determine that while \001 and \003 are part of the
range in question, \002 is not.  But only when using the collating
sequence of that particular locale.

I confirmed that we can work around the problem by telling configure
to use gnulib's replacement wcscoll function (by pretending it is
absent), like this:

  ac_cv_func_wcscoll=no ./configure

With that, all tests passed.

When I went to fix this by adding an autoconf test to detect the
broken wcscoll, and to provide sensible fallback when cross-compiling,
I realized that at least for grep, such a fix is no longer needed,
since all uses of wcscoll have been removed from gnulib's regcomp.c,
by this change:

commit 6410c7a6ea65cceb588aadb497715279d4ec5daa
Author: Paul Eggert <eggert <at> cs.ucla.edu>
Date:   Sat Dec 29 23:31:08 2012 -0800

    regex: implement rational ranges

    Reported by Aharon Robbins in
    <http://sourceware.org/ml/libc-alpha/2012-12/msg00456.html>.
    * lib/regcomp.c (build_range_exp) [!_LIBC]:
    * lib/regexec.c (check_node_accept_bytes) [!_LIBC]:
    Implement rational ranges.

Then, I confirmed that when using a grep tarball built from the latest
in git, all tests pass, too.

Thank you Paul and Arnold/Aharon.




This bug report was last modified 11 years and 213 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.