This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/12547] realloc(p, 0) violates C99
- From: "bruno at clisp dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 27 Feb 2015 18:11:01 +0000
- Subject: [Bug libc/12547] realloc(p, 0) violates C99
- Auto-submitted: auto-generated
- References: <bug-12547-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=12547
--- Comment #13 from Bruno Haible <bruno at clisp dot org> ---
> I think memory leaks are a much lesser evil than double-free.
I disagree. Double-free errors get noticed and reported and therefore fixed
rather quickly. Memory leaks don't. => They are the longer-lasting evil.
But since the standard will say "Invoking realloc with a size argument equal to
zero is an obsolescent feature." glibc could give a warning about this case, if
some debugging flag is enabled (e.g. mtrace or valgrind?).
--
You are receiving this mail because:
You are on the CC list for the bug.