2012-05-11 22:17:15 |
Robert Vollmert |
bug |
|
|
added bug |
2012-05-11 22:17:15 |
Robert Vollmert |
attachment added |
|
program exhibiting bug (compile with -ldl) https://bugs.launchpad.net/bugs/998256/+attachment/3141970/+files/test.c |
|
2012-05-11 22:21:12 |
Robert Vollmert |
description |
regcomp fails to compile the regular expression "^ " with memory error if malloc(0) returns NULL. That's valid malloc behavior, compare 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.
I'm attaching a test program that should exhibit the bug. |
regcomp fails to compile the regular expression "^ " with memory error if malloc(0) returns NULL. That's valid malloc behavior, compare 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.
I'm attaching a test program that should exhibit the bug.
ETA: I've tested this with libc6_2.15-0ubuntu10_amd64 under VMWare. |
|
2012-05-12 21:26:48 |
Robert Vollmert |
description |
regcomp fails to compile the regular expression "^ " with memory error if malloc(0) returns NULL. That's valid malloc behavior, compare 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.
I'm attaching a test program that should exhibit the bug.
ETA: I've tested this with libc6_2.15-0ubuntu10_amd64 under VMWare. |
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. |
|