This is the mail archive of the glibc-bugs-regex@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]