Created attachment 6249 [details]
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.
Could you send this to libc-alpha?
(In reply to Ondrej Bilka from comment #1)
> Could you send this to libc-alpha?