Bug 72312

Summary: re_match doesn't use the start parameter
Product: [Retired] Red Hat Linux Reporter: jeroen <jeroen>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED CURRENTRELEASE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: fweimer, otaylor
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-01-10 15:17:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 67218, 79579    

Description jeroen 2002-08-22 22:24:10 UTC
Anjuta2 has a default editor called "glimmer" (glimmer in gnomecvs). glimmer
uses regexps (/usr/include/regex.h) to highlight code in the GtkTextView.

This works fine in RedHat 7.x and limbo2.

Not anymore in null.

http://www.xs4all.nl/~jeroen/screenshots/anjuta2_null.png

There seem to be some changes made since limbo2 that change the behavior of the
regex functions. What's the story here? Is this a bug?

I haven't yet had time to determine what the problem is exactly (plan to do that
if you guys have no idea why this happens).

Comment 1 jeroen 2002-08-26 12:21:33 UTC
OK, i understand from Owen that the regex implementation has been totally
rewritten for glibc 2.3 so it supports multibyte (unicode) characters. Excellent
stuff. This should allow for correct highlighting of UTF-8 stuff like .schemas
files.

After looking through my code (gtksourceview) and adding some debug output, i've
located the bug.

re_match doesn't use the start parameter.

I call re_match on a string, with a start index of 3 and a length. Now, it will
return the number of characters it has matched, but starting from the beginning
of the string, _not_ the start index. So i'm highlighting an extra 3 characters
in this case (which is incorrect).

Comment 2 Jakub Jelinek 2002-08-26 13:18:11 UTC
Thanks.
http://sources.redhat.com/ml/libc-hacker/2002-08/msg00152.html

Comment 3 Jakub Jelinek 2002-09-02 15:24:05 UTC
Should be fixed in glibc-2.2.90-27 and later.

Comment 4 Jakub Jelinek 2002-09-21 17:59:10 UTC
*** Bug 74359 has been marked as a duplicate of this bug. ***

Comment 5 Jay Turner 2003-01-10 15:17:36 UTC
This appears to be fixed.  Someone reopen if they are still having problems.