From owner-freebsd-current@FreeBSD.ORG Fri Nov 28 18:34:23 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3901CF9 for ; Fri, 28 Nov 2014 18:34:23 +0000 (UTC) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 84BAA216 for ; Fri, 28 Nov 2014 18:34:23 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.14.9/8.14.9) with ESMTP id sASIYH9L071771 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 28 Nov 2014 10:34:17 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.9/8.14.9/Submit) id sASIYGrc071770 for freebsd-current@freebsd.org; Fri, 28 Nov 2014 10:34:16 -0800 (PST) (envelope-from sgk) Date: Fri, 28 Nov 2014 10:34:16 -0800 From: Steve Kargl To: freebsd-current@freebsd.org Subject: Possible bug in softfloat Message-ID: <20141128183416.GA71749@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Nov 2014 18:34:23 -0000 In a thread on comp.lang.c, it was pointed out that softfloat has a bug and in checking src/lib/libc/softfloat I confimed the issue is present in FreeBSD. What I hae not confirmed is whether or not it is possible to hit this bug. In fact, it may only hit arm and mips. Anyway, here's the patch Index: softfloat/bits64/softfloat-macros =================================================================== --- softfloat/bits64/softfloat-macros (revision 275211) +++ softfloat/bits64/softfloat-macros (working copy) @@ -157,7 +157,7 @@ z0 = a0>>count; } else { - z1 = ( count < 64 ) ? ( a0>>( count & 63 ) ) : 0; + z1 = ( count < 128 ) ? ( a0>>( count & 63 ) ) : 0; z0 = 0; } *z1Ptr = z1; -- Steve