This is the mail archive of the
glibc-bugs-regex@sourceware.org
mailing list for the glibc project.
[Bug regex/13762] New: re_search etc. should return -2 on memory exhaustion
- From: "eggert at gnu dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs-regex at sources dot redhat dot com
- Date: Mon, 27 Feb 2012 07:06:59 +0000
- Subject: [Bug regex/13762] New: re_search etc. should return -2 on memory exhaustion
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=13762
Bug #: 13762
Summary: re_search etc. should return -2 on memory exhaustion
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: regex
AssignedTo: unassigned@sourceware.org
ReportedBy: eggert@gnu.org
CC: drepper.fsp@gmail.com
Classification: Unclassified
Created attachment 6249
--> http://sourceware.org/bugzilla/attachment.cgi?id=6249
Fix re_search to return -2 on memory exhaustion.
I ran into this problem when testing GNU grep, which uses
the re_search function. re_search is supposed to return -2
on internal error, but it returns -1 in some cases when
memory is exhausted. -1 simply means "no match", so this
causes grep to falsely claim "no match" when it should have
reported an error due to memory exhaustion.
I'm attaching a patch against the current git master.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.