[Bug 998256] Re: regcomp fails with custom malloc
Robert Vollmert
rob at krikkit.org
Sat May 12 21:26:48 UTC 2012
** Description changed:
regcomp fails to compile the regular expression "^ " with memory error
- if malloc(0) returns NULL. That's valid malloc behavior, compare
- malloc(3).
+ 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_internal.c:re_node_set_alloc being called with size == 0.
+ posix/regex_internal.c:re_node_set_alloc being called with size == 0,
+ and then treating the zero return value as an error.
I'm attaching a test program that should exhibit the bug.
ETA: I've tested this with libc6_2.15-0ubuntu10_amd64 under VMWare.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to eglibc in Ubuntu.
https://bugs.launchpad.net/bugs/998256
Title:
regcomp fails with custom malloc
Status in “eglibc” package in Ubuntu:
New
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_internal.c:re_node_set_alloc being called with size == 0,
and then treating the zero return value as an error.
I'm attaching a test program that should exhibit the bug.
ETA: I've tested this with libc6_2.15-0ubuntu10_amd64 under VMWare.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/998256/+subscriptions
More information about the foundations-bugs
mailing list