]> git.pld-linux.org Git - packages/glibc.git/commitdiff
- added calloc-overflow patch from glibc CVS (contains also memalign fix) glibc-2_2_5-19
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 17 Aug 2002 16:24:04 +0000 (16:24 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- added sln(8) man page taken from util-linux
- release 19

Changed files:
    glibc-calloc-overflow.patch -> 1.1
    glibc.spec -> 1.245
    sln.8 -> 1.1

glibc-calloc-overflow.patch [new file with mode: 0644]
glibc.spec
sln.8 [new file with mode: 0644]

diff --git a/glibc-calloc-overflow.patch b/glibc-calloc-overflow.patch
new file mode 100644 (file)
index 0000000..3096a30
--- /dev/null
@@ -0,0 +1,83 @@
+===================================================================
+RCS file: /cvs/glibc/libc/malloc/malloc.c,v
+retrieving revision 1.87
+retrieving revision 1.87.2.3
+diff -u -r1.87 -r1.87.2.3
+--- libc/malloc/malloc.c       2001/09/19 03:23:27     1.87
++++ libc/malloc/malloc.c       2002/08/09 18:28:55     1.87.2.3
+@@ -1,5 +1,5 @@
+ /* Malloc implementation for multiple threads without lock contention.
+-   Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
++   Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+    Contributed by Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
+    and Doug Lea <dl@cs.oswego.edu>, 1996.
+@@ -19,7 +19,7 @@
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+    02111-1307 USA.  */
+-/* $Id$
++/* $Id$
+   This work is mainly derived from malloc-2.6.4 by Doug Lea
+   <dl@cs.oswego.edu>, which is available from:
+@@ -3795,14 +3795,26 @@
+ {
+   arena *ar_ptr;
+   mchunkptr p, oldtop;
+-  INTERNAL_SIZE_T sz, csz, oldtopsize;
++  INTERNAL_SIZE_T bytes, sz, csz, oldtopsize;
+   Void_t* mem;
+ #if defined _LIBC || defined MALLOC_HOOKS
+   __malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, __const __malloc_ptr_t)) =
+     __malloc_hook;
++
++  /* size_t is unsigned so the behavior on overflow is defined.  */
++    bytes = n * elem_size;
++#define HALF_INTERNAL_SIZE_T \
++  (((INTERNAL_SIZE_T) 1) << (8 * sizeof (INTERNAL_SIZE_T) / 2))
++  if (__builtin_expect ((n | elem_size) >= HALF_INTERNAL_SIZE_T, 0)) {
++    if (elem_size != 0 && bytes / elem_size != n) {
++      __set_errno (ENOMEM);
++      return 0;
++    }
++  }
++
+   if (hook != NULL) {
+-    sz = n * elem_size;
++    sz = bytes;
+ #if defined __GNUC__ && __GNUC__ >= 2
+     mem = (*hook)(sz, RETURN_ADDRESS (0));
+ #else
+@@ -3819,7 +3831,7 @@
+   }
+ #endif
+-  if(request2size(n * elem_size, sz))
++  if(request2size(bytes, sz))
+     return 0;
+   arena_get(ar_ptr, sz);
+   if(!ar_ptr)
+@@ -3862,7 +3874,7 @@
+     }
+     if (p == 0) return 0;
+   }
+-  mem = BOUNDED_N(chunk2mem(p), n * elem_size);
++  mem = BOUNDED_N(chunk2mem(p), bytes);
+   /* Two optional cases in which clearing not necessary */
+@@ -4899,9 +4911,9 @@
+ {
+   void *mem;
+-  /* Test whether the SIZE argument is valid.  It must be a power of
+-     two multiple of sizeof (void *).  */
+-  if (size % sizeof (void *) != 0 || (size & (size - 1)) != 0)
++  /* Test whether the ALIGNMENT argument is valid.  It must be a power
++     of two multiple of sizeof (void *).  */
++  if (alignment % sizeof (void *) != 0 || (alignment & (alignment - 1)) != 0)
+     return EINVAL;
+   mem = __libc_memalign (alignment, size);
index 6b435a310ec19f3073f0b80adbc6065c4df5f962..9065232c00f9654a47e3e023a460a1e3e93e15c3 100644 (file)
@@ -13,7 +13,7 @@ Summary(tr):  GNU libc
 Summary(uk):   GNU libc ×ÅÒÓ¦§ 2.2
 Name:          glibc
 Version:       2.2.5
-Release:       18
+Release:       19
 Epoch:         6
 License:       LGPL
 Group:         Libraries
@@ -25,6 +25,8 @@ Source4:      nscd.logrotate
 Source5:       http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-man-pages.tar.bz2
 Source6:       http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
 Source7:       postshell.c
+# borrowed from util-linux
+Source8:       sln.8
 Patch0:                %{name}-info.patch
 Patch1:                %{name}-versions.awk_fix.patch
 Patch2:                %{name}-pld.patch
@@ -41,6 +43,7 @@ Patch12:      %{name}-use-int-not-arpa.patch
 Patch13:       %{name}-divdi3.patch
 Patch14:       %{name}-nss_dns-overflow.patch
 Patch15:       %{name}-sunrpc-overflow.patch
+Patch16:       %{name}-calloc-overflow.patch
 URL:           http://www.gnu.org/software/libc/
 BuildRequires: gd-devel >= 2.0.1
 BuildRequires: gettext-devel >= 0.10.36
@@ -443,6 +446,7 @@ Zabawka.
 %patch13 -p1
 %patch14 -p1
 %patch15 -p1
+%patch16 -p1
 
 chmod +x scripts/cpp
 
@@ -558,7 +562,7 @@ for i in af az bg de_AT el en eo es_ES et eu fi gr he hr hu id is ja_JP.SJIS \
                echo "%lang($lang) %{_datadir}/locale/$i" >> glibc.lang
        fi
 done
-
+install %{SOURCE8} $RPM_BUILD_ROOT%{_mandir}/man8
 
 install -m755 postshell $RPM_BUILD_ROOT/sbin
 
diff --git a/sln.8 b/sln.8
new file mode 100644 (file)
index 0000000..f97683d
--- /dev/null
+++ b/sln.8
@@ -0,0 +1,23 @@
+.\" Nicolai Langfeldt (janl@math.uio.no)
+.\" In the public domain.
+.TH SLN 8 "20 June 1997" "Linux 2.0" "Linux Programmer's Manual"
+.SH NAME
+sln \- static ln
+.SH SYNOPSIS
+.BI sln " source dest"
+.SH DESCRIPTION
+.B sln
+symbolically links 
+.I dest
+to
+.IR source .
+It is statically linked, needing no dynamic linking at all.  Thus
+.B sln
+is useful to make symbolic links to dynamic libraries if the
+dynamic linking system for some reason is nonfunctional.
+.SH "SEE ALSO"
+.BR ln(1)
+.BR ldconfig(8)
+.BR ld.so(8)
+.\" .SH AUTHOR
+.\" Mike Parker and David MacKenzie.
This page took 0.04964 seconds and 4 git commands to generate.