buggrep - Bugs: bug #29820, with collating element in...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #29820: with collating element in grep-2.6.3.

Submitted by:  Norihirio Tanaka <noritnk>
Submitted on:  Fri 07 May 2010 12:21:14 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Invalid
Privacy: PublicAssigned to: None
Open/Closed: Closed

Thu 02 Dec 2010 09:22:15 PM UTC, comment #5:

Not a grep bug, fixed in upstream glibc.

Paolo Bonzini <bonzini>
Fri 20 Aug 2010 10:36:37 AM UTC, comment #4:

> $ /bin/echo achb | LC_ALL=es_US.iso88591 src/grep 'a[[.ch.]]b'
> src/grep: Invalid collation character


This is a bug in glibc. You can work around it with

$ /bin/echo achb | LC_ALL=es_US.iso88591 src/grep 'a[[.c-h.]]b'

> $ /bin/echo achb | LC_ALL=en_US.UTF-8 src/grep 'a[[.ch.]]b'
> Segmentation fault (core dumped)
> (expected compile-error)


Seems to be fixed now.

Paolo Bonzini <bonzini>
Mon 10 May 2010 06:53:35 AM UTC, comment #3:

Yes, that's correct.

Paolo Bonzini <bonzini>
Mon 10 May 2010 01:14:26 AM UTC, comment #2:

I seem collation elements and equivalence classes is supported
in only regex built in libc.

Therefore even if I prevent from using `dfaexec' by editing source
code and use only included-regex, it isn't likely to be able to
use them...

Norihirio Tanaka <noritnk>
Sun 09 May 2010 02:01:11 PM UTC, comment #1:

Collation elements simply cannot work in dfa.c. There's no support in the C library for using collation elements and equivalence classes outside regex. So, the real solution is to use regex for this too.

Paolo Bonzini <bonzini>
Fri 07 May 2010 12:21:14 PM UTC, original submission:

First, error is returned with collating element in grep-2.6.3.

$ /bin/echo achb | LC_ALL=es_US.iso88591 src/grep 'a[[.ch.]]b'
src/grep: Invalid collation character
$

This message is generated at `re_compile_pattern',
but we don't use GNU regex for for this searching.
Therefore next I comment out dfasearch.c:130-162, rebuild and re-run.

$ /bin/echo achb | LC_ALL=en_US.iso88591 src/grep 'a[[.ch.]]*b'
$
(expected `achb')

$ /bin/echo achb | LC_ALL=en_US.UTF-8 src/grep 'a[[.ch.]]b'
Segmentation fault (core dumped)
(expected compile-error)
$

Configure options: ./configure --with-included-regex

$ LC_ALL=C src/grep --version
GNU grep 2.6.3

Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Norihirio Tanaka <noritnk>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bonzini (Posted a comment)
  • -unavailable- added by noritnk (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 02 Dec 2010 09:22:15 PM UTCbonziniStatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1