From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23126 invoked by alias); 25 Oct 2012 11:18:59 -0000 Received: (qmail 23117 invoked by uid 22791); 25 Oct 2012 11:18:58 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 25 Oct 2012 11:18:54 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 871161C7D3B; Thu, 25 Oct 2012 07:18:53 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 6tLADNdw2EwR; Thu, 25 Oct 2012 07:18:53 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 6DA4A1C7D16; Thu, 25 Oct 2012 07:18:53 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 63CF3C9C3B; Thu, 25 Oct 2012 07:18:49 -0400 (EDT) Date: Thu, 25 Oct 2012 11:18:00 -0000 From: Joel Brobecker To: Andreas Schwab Cc: gdb-patches@sourceware.org Subject: Re: [commit] off-by-one max exponent computation in convert_doublest_to_floatformat Message-ID: <20121025111849.GM3555@adacore.com> References: <1351102361-24045-1-git-send-email-brobecker@adacore.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="x+6KMIRAuhnl3hBn" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-10/txt/msg00493.txt.bz2 --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 455 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 --x+6KMIRAuhnl3hBn Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-gdb.base-ldbl_e308.exp-Do-not-allow-inf-in-value-out.patch" Content-length: 1065 >From e48d36c1af06cff4a602bc475c4acecc157b32dd Mon Sep 17 00:00:00 2001 From: Joel Brobecker 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 --x+6KMIRAuhnl3hBn--