From: Joel Brobecker <brobecker@adacore.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [commit] off-by-one max exponent computation in convert_doublest_to_floatformat
Date: Thu, 25 Oct 2012 11:18:00 -0000 [thread overview]
Message-ID: <20121025111849.GM3555@adacore.com> (raw)
In-Reply-To: <m2zk3ba0j1.fsf@linux-m68k.org>
[-- Attachment #1: Type: text/plain, Size: 455 bytes --]
On Thu, Oct 25, 2012 at 01:54:58AM +0200, Andreas Schwab wrote:
> You are still allowing the bug to happen.
Hmmm, yes, thank you. I was trying to handle the case where sizeof
long double is less than 8, but obviously, that's not the right
approach. I have applied the following patch that just removes "inf"
from the list of valid outputs. We'll make the output target-specific
if we find that we have to.
Tested on x86_64-linux. Checked in.
--
Joel
[-- Attachment #2: 0001-gdb.base-ldbl_e308.exp-Do-not-allow-inf-in-value-out.patch --]
[-- Type: text/x-diff, Size: 1064 bytes --]
From e48d36c1af06cff4a602bc475c4acecc157b32dd Mon Sep 17 00:00:00 2001
From: Joel Brobecker <brobecker@adacore.com>
Date: Thu, 25 Oct 2012 07:11:32 -0400
Subject: [PATCH] gdb.base/ldbl_e308.exp: Do not allow "inf" in value output.
That was an attempt at handling the targets where sizeof(long double)
is less than 8, but the way it was implement allows the bug that
this testcase verifies to come back without being noticed.
gdb/testsuite/ChangeLog:
* gdb.base/ldbl_e308.exp: Remove "inf" from possible expected
output for "print inp" test.
---
gdb/testsuite/gdb.base/ldbl_e308.exp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.base/ldbl_e308.exp b/gdb/testsuite/gdb.base/ldbl_e308.exp
index 89c54b5..ad9c5f4 100644
--- a/gdb/testsuite/gdb.base/ldbl_e308.exp
+++ b/gdb/testsuite/gdb.base/ldbl_e308.exp
@@ -27,5 +27,5 @@ if ![runto_main] {
gdb_test_no_output "set variable ldbl_308 = 1.6e+308l"
gdb_test "print ldbl_308" \
- "= (1\..*e\\+308|inf)"
+ "= 1\..*e\\+308"
--
1.7.9.5
prev parent reply other threads:[~2012-10-25 11:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-24 18:12 Joel Brobecker
2012-10-24 23:55 ` Andreas Schwab
2012-10-25 11:18 ` Joel Brobecker [this message]
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=20121025111849.GM3555@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=schwab@linux-m68k.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