regcomp fails with custom malloc
Bug #998256 reported by
Robert Vollmert
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
eglibc (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
regcomp fails to compile the regular expression "^ " with memory error if malloc(0) returns NULL. That's valid malloc behavior, compare the man page malloc(3).
I had a little trouble debugging, but I believe the problem lies with posix/regex_
I'm attaching a test program that should exhibit the bug.
ETA: I've tested this with libc6_2.