aboutsummaryrefslogtreecommitdiff
path: root/malloc/malloc.c
AgeCommit message (Collapse)Author
2005-01-07Update.Ulrich Drepper
* malloc/malloc.c (malloc_printerr): Print program name as part of error message.
2004-12-22(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.Ulrich Drepper
2007-07-122.5-18.1Jakub Jelinek
2004-12-11Update.Ulrich Drepper
2004-12-11 Ulrich Drepper <drepper@redhat.com> * malloc/malloc.c (_int_realloc): Add checks for corrupted memory. (_int_free): Make clear message are result of free() calls. * malloc/malloc.c (_int_realloc): Remove unnecessary tests for oldmem and size == 0.
2004-12-10Update.Ulrich Drepper
2004-12-09 Ulrich Drepper <drepper@redhat.com> * malloc/malloc.c (public_rEALLOc): Add parameter checks. (_int_free): Provide better error message for invalid pointers.
2004-11-20Update.Ulrich Drepper
* malloc/malloc.c (_int_malloc): Check for corruption of chunk which is about to be returned.
2004-11-19Update.Ulrich Drepper
2004-11-19 Ulrich Drepper <drepper@redhat.com> * malloc/malloc.c (_int_free): Add a few more cheap tests for corruption. * debug/fprintf_chk.c: Adjust all users.
2004-11-13Update.cvs/fedora-glibc-20041115T0915Ulrich Drepper
2004-11-13 Ulrich Drepper <drepper@redhat.com> * malloc/malloc.c (malloc_state): stat_lock_* elements need only be defined if THREAD_STATS is defined. Remove pad0_ since it does not align with cache line sizes in general anyway.
2004-11-13Update.Ulrich Drepper
2004-11-13 Jakub Jelinek <jakub@redhat.com> * elf/rtld.c (print_statistics): Avoid segfaults if not all namespaces are used. Fix computation of num_relative_relocations on RELA architectures other than IA-64 and Alpha. 2004-11-13 Ulrich Drepper <drepper@redhat.com> * malloc/malloc.c (_int_free): Use munmap_chunk for handling mmaped memory.
2004-11-13Update.Ulrich Drepper
* malloc/malloc.c (_int_free): Remove test for NULL parameter. (_int_realloc): Call _int_free only if memory parameter is not NULL.
2004-11-13Update.Ulrich Drepper
2004-11-12 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/libc_fatal.c: Add new function __libc_message which performs the printing and simple format string handling. The string is written to tty, stderr, syslog in this order, stopping after the first successful output. (__libc_fatal): Call __libc_message. * include/stdio.h: Declare __libc_message. * malloc/malloc.c (malloc_printerr): Use __libc_message. * debug/chk_fail.c: Also print message with __libc_message. * debug/test-strcpy_chk.c: Ensure that debug messages are not printed to the terminal or stderr. * debug/tst-chk1.c: Likewise. * posix/Makefile: Remove gpl2lgpl variable.
2004-10-30Update.Ulrich Drepper
2004-10-30 Andreas Schwab <schwab@suse.de> * sysdeps/unix/sysv/linux/waitid.c: Include <stddef.h> for NULL. 2004-10-30 Ulrich Drepper <drepper@redhat.com> * malloc/malloc.c (_int_free): Use unique comments for the error cases.
2004-10-14[BZ #77]Ulrich Drepper
Update. Add support for namespaces in the dynamic linker. * dlfcn/Makefile (libdl-routines): Add dlmopen. * dlfcn/Versions [libdl, GLIBC_2.3.4]: Add dlmopen. * dlfcn/dlfcn.h: Define Lmid_t, LM_ID_BASE, and LM_ID_NEWLM. Declare dlmopen. Document RTLD_DI_LMID. * dlfcn/dlinfo.c: Handle RTLD_DI_LMID. * dlfcn/dlmopen.c: New file. * dlfcn/dlopen.c: Pass new parameter to _dl_open. * dlfcn/dlopenold.c: Likewise. * elf/dl-addr.c: Adjust for removal of GL(dl_loaded). * elf/dl-caller.c: Likewise. * elf/dl-close.c: Likewise. * elf/dl-conflict.c: Likewise. * elf/dl-debug.c: Likewise. * elf/dl-lookup.c: Likewise. * elf/dl-sym.c: Likewise. * elf/dl-version.c: Likewise. * elf/do-lookup.h: Likewise. * elf/rtld.c: Likewise. * sysdeps/unix/sysv/linux/i386/dl-librecon.h: Likewise. * elf/dl-depsc: Likewise. Add new parameter to _dl_map_object. * elf/dl-fini.c: Call destructors in all namespaces. * elf/dl-iteratephdr.c: Compute total nloaded. Adjust for removal of GL(dl_loaded). * elf/dl-libc.c: Pass new parameter to _dl_open. Adjust for removal of GL(dl_loaded). * elf/dl-load.c (_dl_map_object_from_fd): Don't load ld.so a second time. Reuse the one from the main namespace in all others. Pass new parameter to _dl_new_object. Adjust for removal of GL(dl_loaded). * elf/dl-object.c: Take new parameter. Use it to initialize l_ns. Adjust for removal of GL(dl_loaded). * elf/dl-open.c (_dl_open): Take new parameter. Adjust for removal of GL(dl_loaded). * elf/dl-support.c: Replace global _dl_loaded etc variables with _dl_ns variable. * include/dlfcn.h: Adjust prototype of _dl_open. Define __LM_ID_CALLER. * include/link.h: Add l_real, l_ns, and l_direct_opencount elements. * sysdeps/generic/dl-tls.c: Bump TLS_STATIC_SURPLUS. Since libc is using TLS we need memory appropriate to the number of namespaces. * sysdeps/generic/ldsodefs.h (struct rtld_global): Replace _dl_loaded, _dl_nloaded, _dl_global_scope, _dl_main_searchlist, and _dl_global_scope_alloc with _dl_ns element. Define DL_NNS. Adjust prototypes of _dl_map_object and member in rtld_global_ro. * malloc/malloc.c: Include <dlfcn.h>. * malloc/arena.c (ptmalloc_init): If libc is not in primary namespace, never use brk. * elf/Makefile: Add rules to build and run tst-dlmopen1 and tst-dlmopen2. * elf/tst-dlmopen1.c: New file. * elf/tst-dlmopen1mod.c: New file. * elf/tst-dlmopen2.c: New file. * elf/dl-close.c: Improve reference counting by tracking direct loads. * elf/dl-lookup.c (add_dependency): Likewise. * elf/dl-open.c (dl_open_worker): Likewise. * elf/rtld.c (dl_main): Likewise. 2004-09-09 GOTO Masanori <gotom@debian.or.jp> [BZ #77] * elf/dl-close.c: Count down l_opencount to check not only for l_reldeps, but also l_initfini. 2004-10-13 Ulrich Drepper <drepper@redhat.com>
2004-10-06Update.Ulrich Drepper
* posix/tst-getaddrinfo2.c: Include stdlib.h and string.h. (do_test): Use %p instead of 0x%08X to print a pointer. * malloc/malloc.c: Include stdio-common/_itoa.h.
2004-10-01(public_vALLOc): Add missing use of hooks. (public_pVALLOc): Likewise.Ulrich Drepper
2004-09-23Update.Ulrich Drepper
* malloc/malloc.c (malloc_printerr): Use syslog if writev failed.
2004-09-10nt_free): Only do arena boundary check for contiguous arenas.Ulrich Drepper
2004-09-09Update.Ulrich Drepper
2004-09-09 Ulrich Drepper <drepper@redhat.com> * malloc/hooks.c (top_check): Print top chunk corruption as normal error message. * malloc/malloc.c (malloc_printerr): Don't make informational message look like error message.
2004-09-09(_int_free): Add inexpensive double free and memory corruption tests. ↵Ulrich Drepper
(malloc_printf_nc): Renamed to malloc_printerr. Second parameter is no format string anymore. Don't use stdio. Adjust all callers.
2004-09-09Update.Ulrich Drepper
2004-09-08 Ulrich Drepper <drepper@redhat.com> * malloc/malloc.c (_int_free): Add inexpensive double free test.
2004-09-08Update.Ulrich Drepper
2004-09-08 Ulrich Drepper <drepper@redhat.com> * malloc/arena.c: Remove __MALLOC_P uses. * malloc/malloc.c: Likewise. * malloc/mtrace.c: Remove __P uses. * malloc/mcheck-init.c: Likewise.
2004-08-21Update.Ulrich Drepper
* malloc/hooks.c (DEFAULT_CHECK_ACTION): Moved to malloc.c. (check_action): Likewise. When printing error messages, use malloc_printf_nc now instead of fiddling with the streams cancellation flag in every place. * malloc/malloc.c (DEFAULT_CHECK_ACTION): New definition. Change default to 3. (check_action): New variable. (unlink): Print error message and eventually terminate in case list is corrupted. (malloc_printf_nc): New function. Use it in _int_free. Change proposed by Arjan van de Ven.
2004-08-13Update.Ulrich Drepper
2004-08-13 Ulrich Drepper <drepper@redhat.com> * elf/sprof.c (read_symbols): When comparing aliases, prefer strong over weak symbols if both don't start with '_'. * malloc/malloc.c: Use strong_alias instead of weak_alias wherever possible.
2004-03-19Update.Ulrich Drepper
2004-03-18 Ulrich Drepper <drepper@redhat.com> * malloc/malloc.c (__posix_memalign): Correct alignment check. Reported by Don Heller <dheller@cse.psu.edu>.
2004-03-05Update.Ulrich Drepper
* malloc/malloc.c: Don't call exported interface in the implementation.
2003-12-17Update.Ulrich Drepper
2003-12-17 Jakub Jelinek <jakub@redhat.com> * malloc/mtrace.c (tr_old_memalign_hook): New variable. (tr_memalignhook): New function. (mtrace): Register tr_memalignhook. (muntrace): Deregister tr_memalignhook. * malloc/malloc.c (__posix_memalign): If __memalign_hook != NULL, call it directly instead of memalign_internal. 2003-12-17 Ulrich Drepper <drepper@redhat.com> * misc/mntent_r.c: Change encoding to match recently change decoder. Patch by Alexander Achenbach <xela@slit.de>. 2003-12-16 Steven Munroe <sjmunroe@us.ibm.com> * sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h: Correct definition of vrregset_t. 2003-12-16 Steven Munroe <sjmunroe@us.ibm.com> * sysdeps/unix/sysv/linux/powerpc/sys/procfs.h [!__PPC64_ELF_H]: Extent conditional to include typedef elf_vrreg_t. 2002-12-17 Paolo Bonzini <bonzini@gnu.org> * posix/regexec.c (re_search_internal): Limit search to the beginning of the buffer if the initial states are empty for contexts that do not include CONTEXT_BEGBUF or, if !preg->newline_anchor, that do not include any one of CONTEXT_BEGBUF and CONTEXT_NEWLINE.
2003-09-30Update.Ulrich Drepper
2003-09-27 Wolfram Gloger <wg@malloc.de> * malloc/malloc.c: Include <malloc-machine.h> earlier instead of "thread-m.h", so that default parameters can be overridden in a system-specific malloc-machine.h. Remove extra ; from extern "C" closing brace. * sysdeps/generic/malloc-machine.h: New file. * sysdeps/mach/hurd/malloc-machine.h: New file. * malloc/thread-m.h: Removed. * malloc/Makefile: Remove CFLAGS-malloc.c parameter addition, it is in sysdeps/generic/malloc-machine.h now. * elf/dl-reloc.c (_dl_allocate_static_tls): Move definition of variables only used if TLS_TCB_AT_TP is defined into the #if branch.
2003-09-23Update.Ulrich Drepper
2003-09-22 Ulrich Drepper <drepper@redhat.com> * malloc/malloc.c: Include <stdint.h>.
2003-09-12Update.Ulrich Drepper
2003-09-12 Ulrich Drepper <drepper@redhat.com> * grp/Makefile (CFLAGS-getgrgid_r.c, CFLAGS-getgrnam_r.c, CFLAGS-fgetgrent.c, CFLAGS-fgetgrent_r.c, CFLAGS-putgrent.c, CFLAGS-initgroups.c, CFLAGS-getgrgid.c): Add -fexceptions. * inet/Makefile (CFLAGS-either_ntoh.c, CFLAGS-either_hton.c, CFLAGS-getnetgrent.c, CFLAGS-getnetgrent_r.c): Likewise. * io/Makefile (CFLAGS-posix_fallocate.c, CFLAGS-posix_fallocate64.c): Likewise. * misc/Makefile (CFLAGS-err.c): Likewise. * posix/Makefile (CFLAGS-getaddrinfo.c, CFLAGS-spawn.c, CFLAGS-spawnp.c, CFLAGS-spawni.c, CFLAGS-pause.c, CFLAGS-glob.c, CFLAGS-glob64.c): Likewise. * pwd/Makefile (CFLAGS-getpw.c): Likewise. * shadow/Makefile (CFLAGS-fgetspent.c, CFLAGS-fgetspent_r.c, CFLAGS-putspent.c, CFLAGS-getspnam.c, CFLAGS-getspnam_r.c): Likewise. * stdio-common/Makefile (CFLAGS-cuserid.c): Likewise. * sunrpc/Makefile (CFLAGS-openchild.c): Likewise. * stdlib/Makefile (CFLAGS-mkstemp.c): Remove definition. * libio/stdio.h: Remove __THROW from cuserid prototype. * locale/loadarchive.c: Use only non-cancelable interfaces. * resolv/herror.c (herror): Likewise. * malloc/hooks.c: Before using IO stream mark stream so it uses only non-cancelable interfaces. * malloc/malloc.c: Likewise. * posix/getopt.c: Likewise. 2003-09-11 Jakub Jelinek <jakub@redhat.com> * Makerules (LDFLAGS-c.so): Remove -u __register_frame. 2003-09-12 Ulrich Drepper <drepper@redhat.com> * stdio-common/stdio_ext.h: Mark most functions with __THROW. * misc/err.h: Remove __THROW from all prototypes. * posix/getopt.h (__THROW): Define if not already defined. Add __THROW to the getopt functions. 2003-09-11 Ulrich Drepper <drepper@redhat.com> * io/Makefile (CFLAGS-lockf.c): Add -fexceptions. (CFLAGS-fts.c): Likewise. * io/fcntl.h: Remove __THROW from lockf prototypes. * io/fts.h: Remove most __THROW.
2003-09-08Update.Ulrich Drepper
2003-09-08 Wolfram Gloger <wg@malloc.de> * malloc/malloc.c (sYSMALLOc): Move foreign sbrk accounting into contiguous case. Bug report from Prem Gopalan <prem@mazunetworks.com>. (mALLOPt): Avoid requirement of C99.
2003-08-19Update.Ulrich Drepper
* stdio-common/test-vfprintf.c (main): Don't write temporary file into source directory.
2003-08-19Update.Ulrich Drepper
* malloc/malloc.c (_int_free): Add cheap test for some invalid block sizes.
2003-06-18Update.Ulrich Drepper
* malloc/malloc.c (public_mALLINFo): Initialize malloc if it hasn't happened yet. Fix completely broken implementation. The second parameter is of
2003-05-01Update.Ulrich Drepper
2003-05-01 Ulrich Drepper <drepper@redhat.com> * malloc/malloc.c (mSTATs): Call ptmalloc_init if necessary. 2003-04-29 Andreas Schwab <schwab@suse.de> * string/test-strcat.c (do_one_test): Fix attribute name.
2003-04-30(mEMALIGn): Define alias __memalign_internal. (__posix_memalign): Use ↵Ulrich Drepper
__memalign_internal instead of memalign.
2003-01-30Update.Ulrich Drepper
2002-10-07 Wolfram Gloger <wg@malloc.de> * malloc/malloc.c (sYSMALLOc): Only check for breakage due to foreign sbrk()'s if arena is contiguous. Bug report from Bruno Haible <bruno@clisp.org>. 2003-01-30 Jakub Jelinek <jakub@redhat.com> * sysdeps/s390/libc-tls.c: Include stdlib.h. 2003-01-30 Jakub Jelinek <jakub@redhat.com> * stdio-common/vfprintf.c (vfprintf): Only subtract lowest 3 bits of ps.__count. 2003-01-30 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Fix storing and restoring of %r6. * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise. Use 64-bit load. Patch by Martin Schwidefsky <schwidefsky@de.ibm.com>. 2003-01-30 Jakub Jelinek <jakub@redhat.com> * elf/dl-reloc.c (CHECK_STATIC_TLS): Move _dl_signal_error... (allocate_static_tls): ...here. Add __attribute_noinline__. Don't return on failure. (_dl_reloc_bad_type): Add __attribute_noinline__. * elf/do-rel.h (elf_dynamic_do_rel): Add __attribute__((always_inline)). * elf/dynamic-link.h (elf_machine_rel, elf_machine_rela, elf_machine_rel_relative, elf_machine_rela_relative, elf_machine_lazy_rel): Add prototypes with __attribute__((always_inline)). 2003-01-29 David Mosberger <davidm@hpl.hp.com> * elf/dl-support.c (_dl_aux_init): Handle AT_SYSINFO.
2003-01-13* include/fcntl.h: Declare __libc_creat.Roland McGrath
* sysdeps/mach/hurd/Makefile (libmachuser-link.so-no-z-defs, libhurduser-link.so-no-z-defs): New variables. * malloc/malloc.c: Revert last change. * malloc/malloc.h (_int_*): Move these decls to ... * include/malloc.h: ... here. Add attribute_hidden. (_int_valloc): Declare it too.
2003-01-07Update.Ulrich Drepper
2003-01-06 Ulrich Drepper <drepper@redhat.com> * malloc/malloc.c: Makr all _int_* functions as static.
2002-12-18Update.Ulrich Drepper
* malloc/malloc.c (mALLOPt): Make sure malloc is initialized.
2002-12-06* sysdeps/generic/libc-tls.c (__libc_setup_tls): Cope with zero ALIGN.Roland McGrath
* malloc/hooks.c [_LIBC && (USE___THREAD || (USE_TLS && !SHARED))] (malloc_starter, memalign_starter, free_starter): Don't define these. * malloc/malloc.c [_LIBC && (USE___THREAD || (USE_TLS && !SHARED))]: Don't declare them either. * malloc/arena.c (ptmalloc_init) [_LIBC && USE_TLS]: Don't call __pthread_initialize, so no need to set hooks to *_starter. (ptmalloc_init_minimal): New function, broken out of ptmalloc_init. [_LIBC && SHARED && USE_TLS && !USE___THREAD] (__libc_malloc_pthread_startup): New function. * malloc/Versions (libc: GLIBC_PRIVATE): New set, add that function. * malloc/hooks.c (memalign_starter): New function. * malloc/malloc.c: Declare it. * malloc/arena.c (save_memalign_hook): New variable. (ptmalloc_init): Set __memalign_hook to memalign_starter. * elf/dl-minimal.c (free): Clear the memory. (calloc): Just call malloc, knowing all memory it returns is cleared. * sysdeps/generic/dl-tls.c (allocate_dtv): Use calloc instead of malloc and memset; calloc can avoid the zeroing when redundant. (_dl_tls_setup): Likewise. * elf/dl-load.c (decompose_rpath): Likewise. * sysdeps/generic/libc-tls.c (__libc_setup_tls): Comment out memset call, since memory from sbrk at startup is already zero. * elf/rtld.c (_dl_start, dl_main): TLS_INIT_TP macro now returns an error string for failure, null for success. Update callers. * sysdeps/generic/libc-tls.c (__libc_setup_tls): Likewise. * elf/dl-load.c (_dl_map_object_from_fd): Likewise.
2002-09-29* malloc/malloc.c [! MALLOC_DEBUG] (assert): #undef before defining.Roland McGrath
* sysdeps/mach/hurd/Versions (ld: GLIBC_2.2.6): Add __errno_location.
2002-08-262002-08-26 Brian Youmans <3diff@gnu.org>Roland McGrath
* crypt/crypt.c: Changed copying permission notice to Lesser GPL from Library GPL. * crypt/crypt_util.c: Likewise. * crypt/ufc.c: Likewise. * elf/dl-conflict.c: Likewise. * elf/dl-iteratephdr.c: Likewise. * iconv/iconvconfig.h: Likewise. * linuxthreads/Examples/ex10.c: Likewise. * linuxthreads/Examples/ex11.c: Likewise. * linuxthreads/Examples/ex13.c: Likewise. * linuxthreads/Examples/ex8.c: Likewise. * linuxthreads/Examples/ex9.c: Likewise. * linuxthreads/barrier.c: Likewise. * linuxthreads/events.c: Likewise. * linuxthreads/lockfile.c: Likewise. * linuxthreads/no-tsd.c: Likewise. * linuxthreads/pt-machine.c: Likewise. * linuxthreads/ptclock_gettime.c: Likewise. * linuxthreads/ptclock_settime.c: Likewise. * linuxthreads/rwlock.c: Likewise. * linuxthreads/sysdeps/alpha/pspinlock.c: Likewise. * linuxthreads/sysdeps/alpha/pt-machine.h: Likewise. * linuxthreads/sysdeps/arm/pspinlock.c: Likewise. * linuxthreads/sysdeps/arm/pt-machine.h: Likewise. * linuxthreads/sysdeps/cris/pspinlock.c: Likewise. * linuxthreads/sysdeps/cris/pt-machine.h: Likewise. * linuxthreads/sysdeps/hppa/pspinlock.c: Likewise. * linuxthreads/sysdeps/hppa/pt-machine.h: Likewise. * linuxthreads/sysdeps/i386/i686/pt-machine.h: Likewise. * linuxthreads/sysdeps/i386/pspinlock.c: Likewise. * linuxthreads/sysdeps/i386/pt-machine.h: Likewise. * linuxthreads/sysdeps/i386/useldt.h: Likewise. * linuxthreads/sysdeps/ia64/pspinlock.c: Likewise. * linuxthreads/sysdeps/ia64/pt-machine.h: Likewise. * linuxthreads/sysdeps/m68k/pspinlock.c: Likewise. * linuxthreads/sysdeps/m68k/pt-machine.h: Likewise. * linuxthreads/sysdeps/mips/pspinlock.c: Likewise. * linuxthreads/sysdeps/mips/pt-machine.h: Likewise. * linuxthreads/sysdeps/powerpc/pspinlock.c: Likewise. * linuxthreads/sysdeps/powerpc/pt-machine.h: Likewise. * linuxthreads/sysdeps/pthread/bits/initspin.h: Likewise. * linuxthreads/sysdeps/pthread/bits/libc-lock.h: Likewise. * linuxthreads/sysdeps/pthread/bits/libc-tsd.h: Likewise. * linuxthreads/sysdeps/pthread/getcpuclockid.c: Likewise. * linuxthreads/sysdeps/pthread/posix-timer.h: Likewise. * linuxthreads/sysdeps/pthread/timer_create.c: Likewise. * linuxthreads/sysdeps/pthread/timer_delete.c: Likewise. * linuxthreads/sysdeps/pthread/timer_getoverr.c: Likewise. * linuxthreads/sysdeps/pthread/timer_gettime.c: Likewise. * linuxthreads/sysdeps/pthread/timer_routines.c: Likewise. * linuxthreads/sysdeps/pthread/timer_settime.c: Likewise. * linuxthreads/sysdeps/pthread/tst-timer.c: Likewise. * linuxthreads/sysdeps/s390/pspinlock.c: Likewise. * linuxthreads/sysdeps/s390/s390-32/pt-machine.h: Likewise. * linuxthreads/sysdeps/s390/s390-64/pt-machine.h: Likewise. * linuxthreads/sysdeps/sh/pspinlock.c: Likewise. * linuxthreads/sysdeps/sh/pt-machine.h: Likewise. * linuxthreads/sysdeps/sparc/sparc32/pspinlock.c: Likewise. * linuxthreads/sysdeps/sparc/sparc32/pt-machine.h: Likewise. * linuxthreads/sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise. * linuxthreads/sysdeps/sparc/sparc64/pspinlock.c: Likewise. * linuxthreads/sysdeps/sparc/sparc64/pt-machine.h: Likewise. * linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise. * linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise. * linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise. * linuxthreads/sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise. * linuxthreads/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise. * linuxthreads/tststack.c: Likewise. * linuxthreads/unload.c: Likewise. * linuxthreads/weaks.c: Likewise. * linuxthreads/wrapsyscall.c: Likewise. * malloc/arena.c: Likewise. * malloc/hooks.c: Likewise. * malloc/malloc.c: Likewise. * posix/glob/Makefile.ami: Likewise. * posix/glob/Makefile.in: Likewise. * stdlib/gmp-impl.h: Likewise. * stdlib/gmp.h: Likewise. * sysdeps/generic/dl-iteratephdr-static.c: Likewise. * sysdeps/generic/strnlen.c: Likewise. * sysdeps/mach/hurd/powerpc/bits/sigcontext.h: Likewise. * sysdeps/mach/hurd/recvmsg.c: Likewise. * sysdeps/mach/hurd/sendmsg.c: Likewise. * sysdeps/mach/hurd/spawni.c: Likewise. * sysdeps/mach/powerpc/machine-sp.h: Likewise. * sysdeps/mach/powerpc/sysdep.h: Likewise. * sysdeps/mach/powerpc/thread_state.h: Likewise. * sysdeps/unix/bsd/bsd4.4/bits/socket.h: Likewise. * sysdeps/unix/sysv/linux/ia64/dl-iteratephdr-static.c: Likewise. * sysdeps/x86_64/gmp-mparam.h: Likewise.
2002-08-25Update.Ulrich Drepper
2002-08-24 Ulrich Drepper <drepper@redhat.com> * locale/programs/charmap.c (charmap_new_char): Don't use ULONG_MAX as maximum UCS4 value. * sysdeps/unix/sysv/linux/ia64/sys/user.h: New file. * sysdeps/generic/strtol.c: We don't need the isascii test in glibc. * malloc/hooks.c (public_sET_STATe): use size_t as type for i. * malloc/malloc.c (mALLINFo): Likewise. * libio/wstrops.c (_IO_wstr_pbackfail): Use WEOF in comparison. * libio/wfileops.c (_IO_wfile_overflow): Use EOF not WEOF when examining result of _IO_do_flush call. * stdio-common/vfprintf.c (vfprintf): Use correct type in va_arg. Use prec not spec when sizing buffers. * catgets/open_catalog.c (__open_catalog): Add casts to avoid warnings. * locale/loadarchive.c (_nl_load_locale_from_archive): Likewise. * locale/loadlocale.c (_nl_intern_locale_data): Likewise. * stdio-common/vfscanf.c (inchar): Likewise. * misc/efgcvt_r.c (fcvt_r): Likewise. * elf/dl-misc.c (_dl_debug_vdprintf): Likewise. * elf/readlib.c (process_file): Likewise. * elf/sprof.c (load_profdata): Likewise. * sysdeps/ia64/hp-timing.h (HP_TIMING_PRINT): Likewise. * locale/programs/linereader.c (get_toplvl_escape): Likewise. * locale/programs/charmap.c (charmap_read): Likewise. * libio/fileops.c: Likewise. * libio/fmemopen.c: Likewise. * stdlib/strtod.c: Likewise. * elf/dl-load.c: Likewise. * iconv/iconvconfig.c: Likewise. * iconv/iconv_prog.c (process_block): Likewise. * sysdeps/unix/sysv/linux/ia64/Makefile: Define _ASM_IA64_CURRENT_H macro to calm down the compiler. * iconv/gconv_cache.c (__gconv_load_cache): Add cast to avoid warning. * sysdeps/ia64/elf/initfini.c: Don't use newlines embedded in string. * sysdeps/unix/sysv/linux/i386/sysdep.S: Update comment regarding placement of errno definition. * sysdeps/unix/sysv/linux/m68k/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/mips/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise. * resolv/nss_dns/dns-host.c (MAXPACKET): Increase minimum value from 1024 to 65536, to avoid buffer overrun. 2002-08-16 Paul Eggert <eggert@twinsun.com> * resolv/gethnamaddr.c (MAXPACKET): Increase minimum value from 1024 to 65536, to avoid buffer overrun. * resolv/res_query.c (MAXPACKET): Likewise. architectures.
2002-08-23* malloc/hooks.c (__malloc_initialize_hook, __free_hook,Roland McGrath
__malloc_hook, __realloc_hook, __memalign_hook, __after_morecore_hook): Variable definitions moved to ... * malloc/malloc.c: ... here, so as to be before all references.
2002-08-072002-08-07 Jakub Jelinek <jakub@redhat.com>Roland McGrath
* malloc/malloc.c (public_cALLOc): Check ELEM_SIZE != 0 before division. * include/getopt.h: Put private decls inside [_GETOPT_H].
2002-08-04Update.Ulrich Drepper
2002-08-04 Jakub Jelinek <jakub@redhat.com> * manual/debug.texi: Fix spelling to programmatically. Reported by <hayastan132@hotmail.com>. * include/libio.h: Add libc_hidden_proto for __uflow. * include/stdio.h: Map fopen, fdopen, fclose, fputs, fsetpos, and fgetpos to _IO_* names. Add libc_hidden_proto for fileno, fwrite, fseek, fflush_unlocked, fread_unlocked, fwrite_unlocked, fgets_unlocked, fputs_unlocked. * include/wchar.h: Add libc_hidden_proto for fputws_unlocked, putwc_unlocked, vswscanf. * libio/iolibio.h: Add libc_hidden_proto for _IO_fputs. * libio/fileno.c: Use <stdio.h> and libc_hidden_def. * libio/fseek.c: Likewise. * libio/fmemopen.c: Include "libioP.h". Call _IO_fopencookie and not fopencookie. * libio/genops.c (__uflow): Add libc_hidden_def. * libio/iofflush_u.c (fflush_unlocked): Likewise. * libio/iofgets_u.c (fgets_unlocked): Likewise. * libio/iofputs_u.c (fputs_unlocked): Likewise. * libio/iofputws_u.c (fputws_unlocked): Likewise. * libio/iofread_u.c (fread_unlocked): Likewise. * libio/iofwrite_u.c (fwrite_unlocked): Likewise. * libio/iovswscanf.c (vswscanf): Likewise. * libio/putwc_u.c (putwc_unlocked): Likewise. * libio/iofputs.c: Use libc_hidden_def instead of INTDEF. * malloc/malloc.c: Redirect fwrite calls to _IO_fwrite. * malloc/mtrace.c: Likewise. * sunrpc/clnt_perr.c: Remove fputs macro. * sunrpc/svc_simple.c: Likewise. * sunrpc/svc_tcp.c: Likewise. * sunrpc/svc_udp.c: Likewise. * sunrpc/xdr_rec.c: Likewise. * sunrpc/xdr_ref.c: Likewise. * iconv/Makefile: Add CPPFLAGS definitions with -DNOT_in_libc for iconv_prog, linereader, and charmap-dir. * locale/Makefile: Likewise for locale and charmap-dir. * malloc/Makefile: Likewise for memusagestat. * nscd/Makefile: Likewise for nscd, nscd_conf, and dbg_log. * sunrpc/Makefile: Likewise for rpc_main. * sysdeps/unix/sysv/linux/Makefile: Likewise for lddlibc4. * timezone/Makefile: Likewise for zic. * stdio-common/perror.c: Avoid multiple calls to fileno_unlocked.
2002-08-03Update.Ulrich Drepper
2002-08-03 Jakub Jelinek <jakub@redhat.com> Ulrich Drepper <drepper@redhat.com> * malloc/malloc.c (public_cALLOc): Only divide if at least one of arguments is big enough to cause an overflow.
2002-08-02* sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.Roland McGrath
[USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file, which does the right thing when __thread support is available. * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]: Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop', `p_h_errno', `p_resp', and `p_res' members. * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]: Don't initialize `p_errnop' and `p_h_errnop' members. (__pthread_reset_main_thread): Likewise. (__pthread_initialize_manager): Likewise. * manager.c (__pthread_manager, pthread_handle_create): Likewise. * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]: Don't initialize `p_resp' member. (__pthread_reset_main_thread): Likewise. * manager.c (pthread_handle_create): Likewise. * specific.c (libc_internal_tsd_set, libc_internal_tsd_get): Conditionalize these on [!(USE_TLS && HAVE___THREAD)]. * errno.c [USE_TLS && HAVE___THREAD] (__h_errno_location, __res_state): Don't define these at all. * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments! (INSTALL_NEW_DTV, GET_DTV): Likewise. * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise. * weaks.c: Don't include <errno.h> here. 2002-08-01 Roland McGrath <roland@redhat.com> * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of TLS_INIT_TP. (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall. (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both. (TLS_INIT_TP): Use that.
2002-08-02(public_cALLOc): Check for overflow on multiplication.Ulrich Drepper
2002-06-20Update.Ulrich Drepper
2002-06-18 Jakub Jelinek <jakub@redhat.com> * include/unistd.h (__fork_internal): Remove. (__fork): Don't define to __fork_internal. * sysdeps/mach/hurd/fork.c (__fork): Remove INTDEF. * sysdeps/unix/sysv/aix/fork.c (__fork): Likewise. * sysdeps/unix/sysv/linux/ia64/fork.S (__fork_internal): Remove alias. * sysdeps/unix/sysv/linux/sparc/fork.S (__fork_internal): Likewise. * sysdeps/unix/sysv/linux/syscalls.list (__fork_internal): Likewise. 2002-06-20 Ulrich Drepper <drepper@redhat.com> * po/hr.po: New file. 2002-06-11 Wolfram Gloger <wg@malloc.de> * malloc/malloc.c: Fix error path when new_heap() returns NULL. Reported by Michael Meissner <meissner@redhat.com>. 2002-06-20 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/ia64/getcontext.S: Fix typo. Patch by Hans Boehm <hans_boehm@hp.com>.