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.

Submitter:  Norihirio Tanaka <noritnk>
Submitted:  Fri 07 May 2010 12:21:14 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Invalid
Privacy:  Public Assigned 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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-12-02 bonzini StatusNone Invalid
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code