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


Message #32 received at 15527 <at> debbugs.gnu.org (full text, mbox):

From: Dagobert Michelsen <dam <at> opencsw.org>
To: Jim Meyering <jim <at> meyering.net>
Cc: Paul Eggert <eggert <at> cs.ucla.edu>, Aharon Robbins <arnold <at> skeeve.com>,
 15527 <at> debbugs.gnu.org
Subject: Re: bug#15527: Failing test spencer1-locale for grep 2.14 on Solaris
Date: Wed, 16 Oct 2013 17:08:11 +0200
[Message part 1 (text/plain, inline)]
Hi Jim,

Am 16.10.2013 um 16:50 schrieb Jim Meyering <jim <at> meyering.net>:
> On Wed, Oct 16, 2013 at 6:49 AM, Dagobert Michelsen <dam <at> opencsw.org> wrote:
>> Cool, thanks for digging this out! Can you please tell me which
>> invocation of wcscoll fails? I would then open a call at Oracle
>> about the issue.
> 
> Sure.  Here's a snippet from my debugging session.
> This shows that \002 collates *after* \003 in that locale:
> You can see I couldn't believe my eyes, so printed the offending
> wcscoll expression twice :-)
> 
> 2770        /* Build the table for single byte characters.  */
> 2771        for (wc = 0; wc < SBC_MAX; ++wc)
> 2772          {
> 2773            cmp_buf[2] = wc;
> 2774            if (wcscoll (cmp_buf, cmp_buf + 2) <= 0
> 2775                && wcscoll (cmp_buf + 2, cmp_buf + 4) <= 0)
> 2776              bitset_set (sbcset, wc);
> 2777          }
> 2778      }
> (gdb) p wcscoll (cmp_buf + 2, cmp_buf + 4)
> $27 = 3
> (gdb) p cmp_buf+2
> $28 = 0xffbff2f8 L"\002"
> (gdb) p cmp_buf+4
> $29 = 0xffbff300 L"\003"
> (gdb) p wcscoll (cmp_buf + 2, cmp_buf + 4)
> $30 = 3

I don't have too many experience with wide chars, but I fail to isolate the error:

> dam <at> unstable10s [unstable10s]:/home/dam/tmp/wcscoll > cat wcscoll-error.c                    
> 
> #include <stdio.h>
> #include <wchar.h>
> 
> main() {
>   printf( "Result: %d\n", wcscoll( L"\002", L"\003" ) );
> }
> dam <at> unstable10s [unstable10s]:/home/dam/tmp/wcscoll > gcc -o wcscoll-error wcscoll-error.c 
> dam <at> unstable10s [unstable10s]:/home/dam/tmp/wcscoll > ./wcscoll-error 
> Result: -1
> zsh: 2791 exit 184   ./wcscoll-error
> dam <at> unstable10s [unstable10s]:/home/dam/tmp/wcscoll > LC_COLLATE=ru_RU.KOI8-R ./wcscoll-error        
> Result: -1
> zsh: 2809 exit 184   LC_COLLATE=ru_RU.KOI8-R ./wcscoll-error

This is most certainly something really stupid, so I apologize beforehand :-)


Best regards

  -- Dago


-- 
"You don't become great by trying to be great, you become great by wanting to do something,
and then doing it so hard that you become great in the process." - xkcd #896

[smime.p7s (application/pkcs7-signature, attachment)]

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.