Bug 40244 - re_search_2 problem (probably miscompiled glibc)
re_search_2 problem (probably miscompiled glibc)
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Aaron Brown
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-05-11 10:27 EDT by lav
Modified: 2016-11-24 10:13 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-05-11 13:59:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
test program (475 bytes, text/plain)
2001-05-11 10:29 EDT, lav
no flags Details

  None (edit)
Description lav 2001-05-11 10:27:19 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [ru] (X11; U; SunOS 5.8 sun4d)

Description of problem:
re_search_2 fails if length2==0 (length of the second half of text).


How reproducible:
Always

Steps to Reproduce:
1. compile and run attached test program
2.
3.
	

Actual Results:  it says: BUG


Expected Results:  it should say: pos=4


Additional info:

It seems to be a miscompilation of glibc, since if I use exact the same
regex.c from glibc-2.2.2 and compile it along with test program, it works
fine. glibcbug indicates that gcc-2.96-79 was used to compile glibc, while
redhat-7.1 ships with gcc-2.96-81.
Comment 1 lav 2001-05-11 10:29:47 EDT
Created attachment 18166 [details]
test program
Comment 2 Jakub Jelinek 2001-05-11 13:03:08 EDT
What makes you think it is a miscompilation?
regex code changed quite a bit lately to support multibyte character sets.
Anyway, I've fixed this in http://sources.redhat.com/ml/libc-hacker/2001-05/msg00024.html
it will appear in the next glibc rpms.
Comment 3 lav 2001-05-11 13:58:59 EDT
Maybe in glibc regex was just compiled with some defines, like MBS_SUPPORT. When
I tried to compile it manually, I did not supply any extra defines.
Comment 4 Jakub Jelinek 2001-06-06 09:04:38 EDT
Fixed in glibc-2.2.3-6 and above.

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