Possible bug in softfloat

Steve Kargl sgk at troutmask.apl.washington.edu
Fri Nov 28 18:34:23 UTC 2014


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


More information about the freebsd-current mailing list