Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@cygnus.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [PATCH RFA] utils.c: Fix xcalloc (0, 0) behavior
Date: Sat, 03 Mar 2001 00:02:00 -0000	[thread overview]
Message-ID: <1010303080201.ZM24137@ocotillo.lan> (raw)
In-Reply-To: <1010303075808.ZM24102@ocotillo.lan>

On Mar 3, 12:58am, Kevin Buettner wrote:

> Unfortunately, our implementation of xcalloc() and xmrealloc() choose
> to treat the NULL return value as an error condition and call nomem()
> as a result.

It just occurred to me that someone reviewing this patch may want
to know which xcalloc() call in gdb was responsible for generating
a zero-sized request.  See below for the backtrace...

Breakpoint 3, nomem (size=0) at /saguaro1/sourceware-ia64/src/gdb/utils.c:1005
1005      if (size > 0)
(top-gdb) bt 8
#0  nomem (size=0) at /saguaro1/sourceware-ia64/src/gdb/utils.c:1005
During symbol reading, type qualifier 'const' ignored.
#1  0x20000100f0162380 in xcalloc (number=0, size=8)
    at /saguaro1/sourceware-ia64/src/gdb/utils.c:1076
#2  0x20000100f00f6760 in alloc_gdbarch_data (gdbarch=0x10000024f18)
    at /saguaro1/sourceware-ia64/src/gdb/gdbarch.c:4229
#3  0x20000100f00eb8d0 in gdbarch_alloc (info=0x3fefffff3d7c0, 
    tdep=0x10000024eb0) at /saguaro1/sourceware-ia64/src/gdb/gdbarch.c:393
#4  0x20000100f01a4ee0 in ia64_gdbarch_init (info={
      bfd_architecture = bfd_arch_ia64, bfd_arch_info = 0x300341fb8, 
      byte_order = 1234, abfd = 0x0, tdep_info = 0x0}, arches=0x0)
    at /saguaro1/sourceware-ia64/src/gdb/ia64-tdep.c:1971
#5  0x20000100f00f7aa0 in gdbarch_update_p (info={
      bfd_architecture = bfd_arch_ia64, bfd_arch_info = 0x300341fb8, 
      byte_order = 1234, abfd = 0x0, tdep_info = 0x0})
    at /saguaro1/sourceware-ia64/src/gdb/gdbarch.c:4579
#6  0x20000100f00f90a0 in initialize_current_architecture ()
    at /saguaro1/sourceware-ia64/src/gdb/arch-utils.c:685
During symbol reading, type qualifier 'volatile' ignored.
#7  0x20000100f015b070 in gdb_init (
    argv0=0x3fefffffff880 "/home/kev/sourceware-ia64-bld/gdb/gdb")
    at /saguaro1/sourceware-ia64/src/gdb/top.c:685



       reply	other threads:[~2001-03-03  0:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1010303075808.ZM24102@ocotillo.lan>
2001-03-03  0:02 ` Kevin Buettner [this message]
2001-03-05 12:28 ` Andrew Cagney
2001-03-05 12:39   ` J.T. Conklin
2001-03-05 12:51   ` Kevin Buettner
2001-03-05  7:52 David Taylor

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=1010303080201.ZM24137@ocotillo.lan \
    --to=kevinb@cygnus.com \
    --cc=gdb-patches@sources.redhat.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