[Bug regex/13762] New: re_search etc. should return -2 on memory exhaustion

eggert at gnu dot org sourceware-bugzilla@sourceware.org
Mon Feb 27 07:07:00 GMT 2012


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.



More information about the Glibc-bugs mailing list