Bug 72312 - re_match doesn't use the start parameter
Summary: re_match doesn't use the start parameter
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc   
(Show other bugs)
Version: 8.0
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
: 74359 (view as bug list)
Depends On:
Blocks: 67218 79579
TreeView+ depends on / blocked
Reported: 2002-08-22 22:24 UTC by jeroen
Modified: 2016-11-24 14:59 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-01-10 15:17:36 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

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.


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

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

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.

Note You need to log in before you can comment on or make changes to this bug.