aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--include/fenv.h1
-rw-r--r--malloc/malloc.c17
-rw-r--r--math/fegetenv.c1
-rw-r--r--sysdeps/i386/fpu/fegetenv.c1
-rw-r--r--sysdeps/ia64/fpu/fegetenv.c1
-rw-r--r--sysdeps/powerpc/fpu/fegetenv.c1
-rw-r--r--sysdeps/s390/fpu/fegetenv.c5
-rw-r--r--sysdeps/sh/sh4/fpu/fegetenv.c1
-rw-r--r--sysdeps/sparc/fpu/fegetenv.c1
-rw-r--r--sysdeps/x86_64/fpu/fegetenv.c1
11 files changed, 36 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index a68be80..9b24c0b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2010-02-08 Andreas Schwab <schwab@redhat.com>
+
+ * include/fenv.h: Add hidden proto for fegetenv.
+ * math/fegetenv.c: Add hidden alias.
+ * sysdeps/i386/fpu/fegetenv.c: Likewise.
+ * sysdeps/ia64/fpu/fegetenv.c: Likewise.
+ * sysdeps/powerpc/fpu/fegetenv.c: Likewise.
+ * sysdeps/sh/sh4/fpu/fegetenv.c: Likewise.
+ * sysdeps/sparc/fpu/fegetenv.c: Likewise.
+ * sysdeps/x86_64/fpu/fegetenv.c: Likewise
+ * sysdeps/s390/fpu/fegetenv.c: Likewise. Remove unused headers.
+
2010-02-05 H.J. Lu <hongjiu.lu@intel.com>
[BZ #11230]
diff --git a/include/fenv.h b/include/fenv.h
index 3aec7e5..254162d 100644
--- a/include/fenv.h
+++ b/include/fenv.h
@@ -13,6 +13,7 @@ extern int __fesetenv (__const fenv_t *__envp);
extern int __feupdateenv (__const fenv_t *__envp);
libm_hidden_proto (feraiseexcept)
+libm_hidden_proto (fegetenv)
libm_hidden_proto (fesetenv)
libm_hidden_proto (fesetround)
libm_hidden_proto (feholdexcept)
diff --git a/malloc/malloc.c b/malloc/malloc.c
index b43e454..acf1bec 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -1,5 +1,5 @@
/* Malloc implementation for multiple threads without lock contention.
- Copyright (C) 1996-2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1996-2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Wolfram Gloger <wg@malloc.de>
and Doug Lea <dl@cs.oswego.edu>, 2001.
@@ -4850,7 +4850,8 @@ _int_free(mstate av, mchunkptr p)
free_perturb (chunk2mem(p), size - SIZE_SZ);
set_fastchunks(av);
- fb = &fastbin (av, fastbin_index(size));
+ unsigned int idx = fastbin_index(size);
+ fb = &fastbin (av, idx);
#ifdef ATOMIC_FASTBINS
mchunkptr fd;
@@ -4864,6 +4865,12 @@ _int_free(mstate av, mchunkptr p)
errstr = "double free or corruption (fasttop)";
goto errout;
}
+ if (old != NULL && (chunksize(old) > request2size(MAX_FAST_SIZE)
+ || fastbin_index(chunksize(old)) != idx))
+ {
+ errstr = "invalid fastbin entry (free)";
+ goto errout;
+ }
p->fd = fd = old;
}
while ((old = catomic_compare_and_exchange_val_rel (fb, p, fd)) != fd);
@@ -4875,6 +4882,12 @@ _int_free(mstate av, mchunkptr p)
errstr = "double free or corruption (fasttop)";
goto errout;
}
+ if (*fb != NULL && (chunksize(*fb) > request2size(MAX_FAST_SIZE)
+ || fastbin_index(chunksize(*fb)) != idx))
+ {
+ errstr = "invalid fastbin entry (free)";
+ goto errout;
+ }
p->fd = *fb;
*fb = p;
diff --git a/math/fegetenv.c b/math/fegetenv.c
index 4a878cc..5b52430 100644
--- a/math/fegetenv.c
+++ b/math/fegetenv.c
@@ -32,6 +32,7 @@ __fegetenv (fenv_t *envp)
strong_alias (__fegetenv, __old_fegetenv)
compat_symbol (libm, BP_SYM (__old_fegetenv), BP_SYM (fegetenv), GLIBC_2_1);
#endif
+libm_hidden_ver (__fegetenv, fegetenv)
versioned_symbol (libm, BP_SYM (__fegetenv), BP_SYM (fegetenv), GLIBC_2_2);
stub_warning (fegetenv)
diff --git a/sysdeps/i386/fpu/fegetenv.c b/sysdeps/i386/fpu/fegetenv.c
index fb955cf..ddb67e5 100644
--- a/sysdeps/i386/fpu/fegetenv.c
+++ b/sysdeps/i386/fpu/fegetenv.c
@@ -40,4 +40,5 @@ strong_alias (__fegetenv, __old_fegetenv)
compat_symbol (libm, BP_SYM (__old_fegetenv), BP_SYM (fegetenv), GLIBC_2_1);
#endif
+libm_hidden_ver (__fegetenv, fegetenv)
versioned_symbol (libm, BP_SYM (__fegetenv), BP_SYM (fegetenv), GLIBC_2_2);
diff --git a/sysdeps/ia64/fpu/fegetenv.c b/sysdeps/ia64/fpu/fegetenv.c
index 5446b16..e240f75 100644
--- a/sysdeps/ia64/fpu/fegetenv.c
+++ b/sysdeps/ia64/fpu/fegetenv.c
@@ -27,3 +27,4 @@ fegetenv (fenv_t *envp)
return 0;
}
+libm_hidden_def (fegetenv)
diff --git a/sysdeps/powerpc/fpu/fegetenv.c b/sysdeps/powerpc/fpu/fegetenv.c
index 5395345..3d21abb 100644
--- a/sysdeps/powerpc/fpu/fegetenv.c
+++ b/sysdeps/powerpc/fpu/fegetenv.c
@@ -35,4 +35,5 @@ strong_alias (__fegetenv, __old_fegetenv)
compat_symbol (libm, BP_SYM (__old_fegetenv), BP_SYM (fegetenv), GLIBC_2_1);
#endif
+libm_hidden_ver (__fegetenv, fegetenv)
versioned_symbol (libm, BP_SYM (__fegetenv), BP_SYM (fegetenv), GLIBC_2_2);
diff --git a/sysdeps/s390/fpu/fegetenv.c b/sysdeps/s390/fpu/fegetenv.c
index a244f2c..04da54c 100644
--- a/sysdeps/s390/fpu/fegetenv.c
+++ b/sysdeps/s390/fpu/fegetenv.c
@@ -20,10 +20,6 @@
#include <fenv_libc.h>
#include <fpu_control.h>
-#include <stddef.h>
-#include <asm/ptrace.h>
-#include <sys/ptrace.h>
-#include <unistd.h>
int
fegetenv (fenv_t *envp)
@@ -33,3 +29,4 @@ fegetenv (fenv_t *envp)
/* Success. */
return 0;
}
+libm_hidden_def (fegetenv)
diff --git a/sysdeps/sh/sh4/fpu/fegetenv.c b/sysdeps/sh/sh4/fpu/fegetenv.c
index c07b32a..683939b 100644
--- a/sysdeps/sh/sh4/fpu/fegetenv.c
+++ b/sysdeps/sh/sh4/fpu/fegetenv.c
@@ -29,3 +29,4 @@ fegetenv (fenv_t *envp)
return 0;
}
+libm_hidden_def (fegetenv)
diff --git a/sysdeps/sparc/fpu/fegetenv.c b/sysdeps/sparc/fpu/fegetenv.c
index 36486f5..c606a9c 100644
--- a/sysdeps/sparc/fpu/fegetenv.c
+++ b/sysdeps/sparc/fpu/fegetenv.c
@@ -34,4 +34,5 @@ strong_alias (__fegetenv, __old_fegetenv)
compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1);
#endif
+libm_hidden_ver (__fegetenv, fegetenv)
versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2);
diff --git a/sysdeps/x86_64/fpu/fegetenv.c b/sysdeps/x86_64/fpu/fegetenv.c
index fa5a8da..2159a1f 100644
--- a/sysdeps/x86_64/fpu/fegetenv.c
+++ b/sysdeps/x86_64/fpu/fegetenv.c
@@ -28,3 +28,4 @@ fegetenv (fenv_t *envp)
/* Success. */
return 0;
}
+libm_hidden_def (fegetenv)