public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bruno at clisp dot org" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/12547] realloc(p, 0) violates C99
Date: Fri, 27 Feb 2015 18:11:00 -0000	[thread overview]
Message-ID: <bug-12547-131-qIWNJHWlLo@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-12547-131@http.sourceware.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.


  parent reply	other threads:[~2015-02-27 18:11 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-06 22:48 [Bug libc/12547] New: " msebor at gmail dot com
2011-03-11  1:11 ` [Bug libc/12547] " drepper.fsp at gmail dot com
2011-03-17 19:03 ` jsm28 at gcc dot gnu.org
2011-03-24 17:10 ` eblake at redhat dot com
2011-03-24 17:20 ` eblake at redhat dot com
2011-03-24 17:23 ` jakub at redhat dot com
2011-03-25  0:08 ` bruno at clisp dot org
2011-04-01 22:52 ` eblake at redhat dot com
2011-04-01 23:40 ` drepper.fsp at gmail dot com
2011-04-07 17:06 ` nick at usenix dot org
2014-02-16 17:51 ` jackie.rosen at hushmail dot com
2014-05-28 19:43 ` schwab at sourceware dot org
2014-06-27 13:47 ` fweimer at redhat dot com
2015-02-22 20:49 ` bugdal at aerifal dot cx
2015-02-23 12:19 ` joseph at codesourcery dot com
2015-02-23 18:09 ` bugdal at aerifal dot cx
2015-02-27 18:11 ` bruno at clisp dot org [this message]
2015-02-27 19:11 ` bugdal at aerifal dot cx
2015-08-22 20:32 ` [Bug malloc/12547] " jsm28 at gcc dot gnu.org
2019-10-03 11:58 ` bugdal at aerifal dot cx

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-12547-131-qIWNJHWlLo@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).