Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: Richard.Earnshaw@arm.com,
	"Thomas,Stephen" <stephen.thomas@superh.com>,
	Geoff Keating <geoffk@geoffk.org>,
	gdb@sources.redhat.com, "McGoogan,
	Sean" <sean.mcgoogan@superh.com>
Subject: Re: memset (0, 0, 0);
Date: Tue, 08 Apr 2003 20:51:00 -0000	[thread overview]
Message-ID: <3E93363D.90409@redhat.com> (raw)
In-Reply-To: <20030408132559.GA24135@nevyn.them.org>

> It looks as though that implementation of xmalloc doesn't match the 
>> general specification of xmalloc, which is that xmalloc must *never* 
>> return NULL (see libiberty/xmalloc.c for the specification).
>> 
>> I'm not sure why gdb is trying to provide its own implementation of these 
>> functions and not use those in libiberty.  Andrew?
> 
> 
> The ones in libiberty call exit; the ones in gdb call error() and
> unwind cleanups.  GDB prefers not to abort when it runs out of memory,
> esp. if it can just abort the current operation and reclaim memory.

The other reason is that, optionally, they need to be routed through to 
  mmalloc() calls.

Anyway, it should be pretty clear that the real problem here is that 
something was lost in the liberty/xmalloc -> gdb/xmalloc translation (I 
suspect that there was a debate way back when and it forgot to take 
liberty's xmalloc's `well defined semantics' into account).

I'll check in a `fix'.

Andrew



  parent reply	other threads:[~2003-04-08 20:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-08  7:52 Thomas,Stephen
2003-04-08 13:10 ` Richard Earnshaw
2003-04-08 13:26   ` Daniel Jacobowitz
2003-04-08 16:40     ` Richard Earnshaw
2003-04-08 20:51     ` Andrew Cagney [this message]
2003-04-08 17:57 ` Richard Earnshaw
  -- strict thread matches above, loose matches on Subject: below --
2003-04-07  9:22 Thomas,Stephen
2003-04-07 13:07 ` Daniel Jacobowitz
2003-04-07 17:18 ` Geoff Keating
2003-04-04 16:12 Petr Vandrovec
2003-04-04 21:36 ` Andreas Schwab
2003-04-04 14:54 Joern Rennecke
2003-04-04 15:04 ` Daniel Jacobowitz
2003-04-04 15:16 ` Andrew Cagney
2003-04-04 15:21 ` Andreas Schwab

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=3E93363D.90409@redhat.com \
    --to=ac131313@redhat.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=drow@mvista.com \
    --cc=gdb@sources.redhat.com \
    --cc=geoffk@geoffk.org \
    --cc=sean.mcgoogan@superh.com \
    --cc=stephen.thomas@superh.com \
    /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