Bug 40244 - re_search_2 problem (probably miscompiled glibc)
Summary: re_search_2 problem (probably miscompiled glibc)
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc   
(Show other bugs)
Version: 7.1
Hardware: i386 Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Aaron Brown
Depends On:
TreeView+ depends on / blocked
Reported: 2001-05-11 14:27 UTC by lav
Modified: 2016-11-24 15:13 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-05-11 17:59:04 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
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 14:29 UTC, lav
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2001:121 normal SHIPPED_LIVE GNU C Library bugfix update 2001-10-04 04:00:00 UTC

Description lav 2001-05-11 14:27:19 UTC
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:

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

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 14:29:47 UTC
Created attachment 18166 [details]
test program

Comment 2 Jakub Jelinek 2001-05-11 17:03:08 UTC
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 17:58:59 UTC
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 13:04:38 UTC
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.