patchgrep - Patches: patch #5115, Reassigned to another tracker...

 
 

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

patch #5115: Reassigned to another tracker [was: Collating symbols and equivalence classes incorrectly parsed if !MBS_SUPPORT]

Submitted by:  Ben Byer <bbyer>
Submitted on:  Sat 20 May 2006 04:27:10 PM UTC  
 
Category: NonePriority: 5 - Normal
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Closed

Thu 11 Mar 2010 09:02:46 AM UTC, comment #5:

THIS ITEM WAS REASSIGNED TO BUG #29188


Please, do not post any new comments to this item.

Paolo Bonzini <bonzini>
Thu 11 Mar 2010 09:02:46 AM UTC, comment #4:

[. .] and [= =] are currently not supported if !MBS_SUPPORT, but the patch is wrong because [[.ch.]] would become equivalent to [ch] rather than "ch".

I moved this to the bug tracker.

Paolo Bonzini <bonzini>
Thu 01 Jun 2006 01:56:54 PM UTC, comment #3:

After applying the patch:

$ echo abc | LC_ALL=C src/grep [^[.a.]b]
Segmentation fault
$ echo abc | LC_ALL=nl_NL src/grep [^[.a.]b]
Segmentation fault
$ echo abc | LC_ALL=nl_NL.utf8 src/grep [^[.a.]b]
abc

$ LC_ALL=C gdb src/grep
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run [^[.a.]b] abcfile
Starting program: /home/ben/Sources/grep/src/grep [^[.a.]b] abcfile

Program received signal SIGSEGV, Segmentation fault.
0x08050090 in setbit (b=12, c=0xbf917ce0) at dfa.c:277
277 c[b / INTBITS] |= 1 << b % INTBITS;
(gdb) back
#0 0x08050090 in setbit (b=12, c=0xbf917ce0) at dfa.c:277
#1 0x08051815 in lex () at dfa.c:1109
#2 0x08052cce in dfaparse (s=0x1000 <Address 0x1000 out of bounds>, len=4096,
d=0x805d3c0) at dfa.c:1487
#3 0x08056f9e in dfacomp (s=0x805e098 "[^[.a.]b]", len=9, d=0x805d3c0, searchflag=1)
at dfa.c:3085
#4 0x0804da44 in GEAcompile (pattern=0x805e098 "[^[.a.]b]", size=9, syntax_bits=2822)
at search.c:273
#5 0x0804dc41 in Gcompile (pattern=0x1000 <Address 0x1000 out of bounds>,
size=3213982944) at search.c:283
#6 0x0804c6be in main (argc=6, argv=0x805e078) at grep.c:2222
(gdb)

Benno Schulenberg <bens>
Thu 01 Jun 2006 12:41:12 AM UTC, comment #2:

Sorry about that -- I rewrote the patch to the appropriate portable functions; does this work for you?

Ben Byer <bbyer>
Thu 25 May 2006 09:38:53 PM UTC, comment #1:

Patch applies cleanly, but make fails here with:

dfa.o: In function `try_collating_thing':
/home/ben/Sources/grep-new/src/dfa.c:766: undefined reference to `strnstr'
/home/ben/Sources/grep-new/src/dfa.c:780: undefined reference to `strlcpy'

The command

$ echo abc | src/grep [^[.a.]b]

fails only in C and iso-8859 locales though, not in utf8 locales.

Benno Schulenberg <bens>
Sat 20 May 2006 04:27:10 PM UTC, original submission:

THIS ITEM WAS REASSIGNED TO BUG #29188
From http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap09.html#tag_09_03_05

A collating symbol is a collating element enclosed within bracket-period ( "[." and ".]" ) delimiters. Collating elements are defined as described in Collation Order . Conforming applications shall represent multi-character collating elements as collating symbols when it is necessary to distinguish them from a list of the individual characters that make up the multi-character collating element. For example, if the string "ch" is a collating element defined using the line:

collating-element <ch-digraph> from "<c><h>"

in the locale definition, the expression "[[.ch.]]" shall be treated as an RE containing the collating symbol 'ch' , while "[ch]" shall be treated as an RE matching 'c' or 'h' . Collating symbols are recognized only inside bracket expressions. If the string is not a collating element in the current locale, the expression is invalid.

Ben Byer <bbyer>

 

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)
  •  

    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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 11 Mar 2010 09:02:46 AM UTCbonziniSummarygrep [^[.a.]b] fails with input abc=>Collating symbols and equivalence classes incorrectly parsed if !MBS_SUPPORT
      Reassign Itemgrep, patch #5115=>grep, bug #29188
    Thu 01 Jun 2006 12:41:12 AM UTCbbyerAttached File-=>Added dfa.patch.v2, #10097
    Sat 20 May 2006 04:27:10 PM UTCbbyerAttached File-=>Added dfa.patch, #10015

    Back to the top


    Powered by Savane 3.1-cleanup