Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: [PATCH] Avoid floatformat_from_doublest() assertion failure
Date: Thu, 08 Aug 2002 17:55:00 -0000	[thread overview]
Message-ID: <1020809005506.ZM26693@localhost.localdomain> (raw)

I've just committed the change below.

On Irix, I was running into an assertion failure in
floatformat_from_doublest() due to fmt being NULL.  (gdb can't handle
16 byte long doubles.)  The caller was store_floating() and, prior to
the call, had determined that fmt was NULL and had printed a suitable
warning.  Moreover, the return value had been filled in with a
suitable value.  (Well, as suitable as possible for something that
gdb says it can't do.)

	* doublest.c (store_floating): Avoid floatformat_from_doublest()
	assertion failure by returning early after a warning.

Index: doublest.c
===================================================================
RCS file: /cvs/src/src/gdb/doublest.c,v
retrieving revision 1.9
diff -u -p -r1.9 doublest.c
--- doublest.c	9 Feb 2002 17:25:57 -0000	1.9
+++ doublest.c	9 Aug 2002 00:37:23 -0000
@@ -681,6 +681,7 @@ store_floating (void *addr, int len, DOU
     {
       warning ("Can't store a floating-point number of %d bytes.", len);
       memset (addr, 0, len);
+      return;
     }
 
   floatformat_from_doublest (fmt, &val, addr);


                 reply	other threads:[~2002-08-09  0:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1020809005506.ZM26693@localhost.localdomain \
    --to=kevinb@redhat.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