summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortobiasu <tobiasu@openbsd.org>2014-06-07 01:41:26 +0000
committertobiasu <tobiasu@openbsd.org>2014-06-07 01:41:26 +0000
commit08c8ac25da87bf49404a5e1f4829fb5406e282a0 (patch)
treecfbc20623b0ccb5567a60adb8dffbe893f6cbd30
parentAllocate the struct itty array in ttystats_init() with M_ZERO. (diff)
downloadwireguard-openbsd-08c8ac25da87bf49404a5e1f4829fb5406e282a0.tar.xz
wireguard-openbsd-08c8ac25da87bf49404a5e1f4829fb5406e282a0.zip
Fix modf() on sparc
For large integral values, modf returned uninitialized data in iptr since 1992. Found while debugging python segfaults. ok miod
-rw-r--r--lib/libc/arch/sparc/gen/modf.S6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/arch/sparc/gen/modf.S b/lib/libc/arch/sparc/gen/modf.S
index 6eda1351ef4..f5102305df0 100644
--- a/lib/libc/arch/sparc/gen/modf.S
+++ b/lib/libc/arch/sparc/gen/modf.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: modf.S,v 1.8 2012/08/22 17:19:35 pascal Exp $ */
+/* $OpenBSD: modf.S,v 1.9 2014/06/07 01:41:26 tobiasu Exp $ */
/*
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
@@ -175,11 +175,11 @@ Lbig:
*/
#ifdef __PIC__
PICCY_SET(L0, %l0, %o7)
- std %f0, [%i2] ! *ival = val;
+ std %i0, [%i2] ! *ival = val;
ldd [%l0], %f0 ! return 0.0;
#else
sethi %hi(L0), %l0
- std %f0, [%i2] ! *ival = val;
+ std %i0, [%i2] ! *ival = val;
ldd [%l0 + %lo(L0)], %f0 ! return 0.0;
#endif
ret