about summary refs log tree commit diff
path: root/malloc/malloc.c
Commit message (Collapse)AuthorAgeFilesLines
* * malloc/malloc.c (_int_free): Fail if block size is obviously wrong.Ulrich Drepper2005-10-131-0/+6
|
* Correctly implement M_MXFAST.Ulrich Drepper2005-10-121-24/+27
| | | | | | | | | | | | | | | | | | | | * malloc/malloc.c (struct malloc_state): Replace max_fast with flags fields. (global_max_fast): New variable. (set_max_fast): Change to not require arena parameter and to modify global_max_fast. Change all callers. (get_max_fast): New macro. Use this instead of directly accessing now removed max_fast arena member. (have_fastchunks): Use flags instead of max_fast. (clear_fastchunks): Likewise. (set_fastchunks): Likewise. (contiguous): Likewise. (noncontiguous): Likewise. (set_noncontiguous): Likewise. (set_contiguous): Likewise. (malloc_init_state): Explicitly set FASTCHUNKS_BIT. Call set_max_fast only for main arena. * malloc/hooks.c (public_sET_STATe): Adjust set_max_fast use.
* [BZ #786]Ulrich Drepper2005-09-271-1/+1
| | | | * malloc/malloc.c (_int_realloc): Make error message clearer.
* * malloc/malloc.c (struct malloc_chunk): Fix comment typo.Ulrich Drepper2005-09-121-3/+7
| | | | | (public_cALLOc): For mmapped chunks and perturb_byte != 0, don't clear SIZE_SZ bytes more than should be cleared.
* * malloc/malloc.c (public_cALLOc): We cannot skip the memoryUlrich Drepper2005-03-201-3/+3
| | | | clearing if perturb_byte != 0.
* [BZ #779]Ulrich Drepper2005-03-191-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-03-10 Jakub Jelinek <jakub@redhat.com> * math/test-misc.c (main): Add some more tests. 2005-03-17 Jakub Jelinek <jakub@redhat.com> * posix/regcomp.c (re_compile_fastmap_iter): Fix check for failed __wcrtomb. Check return values of other __wcrtomb calls. * posix/regex_internal.c (build_wcs_buffer, re_string_skip_chars): Change mbclen type to size_t. (build_wcs_upper_buffer): Change mbclen and mbcdlen type to size_t. Handle mb chars whose upper case doesn't have multibyte representation in locale's charset. 2005-03-15 Jakub Jelinek <jakub@redhat.com> * malloc/malloc.c (_int_icalloc, _int_icomalloc, iALLOc, public_iCALLOc, public_iCALLOc, public_iCOMALLOc): Protect with #ifndef _LIBC. [BZ #779] * malloc/malloc.c (public_mTRIm): Initialize malloc if not yet initialized. 2005-03-10 Jakub Jelinek <jakub@redhat.com> * misc/sys/cdefs.h (__always_inline): Define. * posix/bits/unistd.h (read, pread, pread64, readlink, getcwd, getwd): Use __always_inline instead of __inline. * socket/bits/socket2.h (recv, recvfrom): Likewise. * libio/bits/stdio2.h (gets, fgets, fgets_unlocked): Likewise. * string/bits/string3.h (__memcpy_ichk, __memmove_ichk, __mempcpy_ichk, __memset_ichk, __strcpy_ichk, __stpcpy_ichk, __strncpy_ichk, __strcat_ichk, __strncat_ichk): Use __always_inline instead of __inline__ __attribute__ ((__always_inline__)). 2005-03-09 Jakub Jelinek <jakub@redhat.com> * debug/tst-chk1.c: Include sys/socket.h and sys/un.h. (do_test): Add new tests for recv, recvfrom, getcwd, getwd and readlink. Add some more tests for read, pread, pread64, fgets and fgets_unlocked. * posix/bits/unistd.h (read, pread, pread64, readlink, getcwd, getwd): Change macros into extern inline functions. (__read_alias, __pread_alias, __pread64_alias, __readlink_alias, __getcwd_alias, __getwd_alias): New prototypes. * socket/bits/socket2.h (recv, recvfrom): Change macros into extern inline functions. (__recv_alias, __recvfrom_alias): New prototypes. * libio/bits/stdio2.h (gets, fgets, fgets_unlocked): Change macros into extern inline functions. (__gets_alias, __fgets_alias, __fgets_unlocked_alias): New prototypes. * debug/pread_chk.c (__pread_chk): Fix order of arguments passed to __pread. * debug/pread64_chk.c (__pread64_chk): Fix order of arguments passed to __pread64.
* * malloc/arena.c (ptmalloc_init): Recognize MALLOC_PERTURB_ and callUlrich Drepper2005-03-081-15/+55
| | | | | | | | | | | | mallopt appropriately. * malloc/malloc.h: Define M_PERTURB. * malloc/malloc.c (perturb_byte): New variable. (alloc_perturb, free_perturb): New macros. (_int_malloc): Before returning, overwrite the memory if this is requested. (_int_free): Overwrite freed memory if requested. (mALLOPt): Handle M_PERTURB. * test-skeleton.c: Add call to mallopt with M_PERTURB command.
* * sysdeps/unix/sysv/linux/libc_fatal.c: Print backtrace and memoryUlrich Drepper2005-02-211-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | map if requested. * debug/chk_fail.c: Request backtrace and memory map dump. * Versions.def: Add GLIBC_2.4 for libc. * debug/fgets_chk.c: New file. * debug/fgets_u_chk.c: New file. * debug/getcwd_chk.c: New file. * debug/getwd_chk.c: New file. * debug/readlink_chk.c: New file. * debug/read_chk.c: New file. * debug/pread_chk.c: New file. * debug/pread64_chk.c: New file. * debug/recv_chk.c: New file. * debug/recvfrom_chk.c: New file. * debug/Versions: Add all new functions with version GLIBC_2.4. * debug/Makefile (routines): Add fgets_chk, fgets_u_chk, read_chk, pread_chk, pread64_chk, recv_chk, recvfrom_chk, readlink_chk, getwd_chk, and getcwd_chk. Plus appropriate CFLAGS definitions. * debug/tst-chk1.c: Add more tests. * libio/bits/stdio2.h: Add macros for fgets and fgets_unlocked. * include/stdio.h: Declare __fgets_chk and __fgets_unlocked_chk. * posix/unistd.h: Include <bits/unistd.h> for fortification. * posix/bits/unistd.h: New file. * posix/Makefile (headers): Add bits/unistd.h. * socket/sys/socket.h: Include <bits/socket2.h> for fortification. * socket/bits/socket2.h: New file. * socket/Makefile (headers): Add bits/socket2.h. * string/bits/string3.h: Extend memset macro to check for zero 3rd parameter and use __memset_zero_constant_len_parameter in that case. * sysdeps/generic/memset_chk.c: Add __memset_zero_constant_len_parameter alias and linker warning. * debug/Versions: Add __memset_zero_constant_len_parameter to libc with version GLIBC_2.4. * sysdeps/generic/bits/types.h: Don't unnecessarily use __extension__ in __STD_TYPE definition. 2005-02-21 Jakub Jelinek <jakub@redhat.com> * malloc/malloc.c (malloc_printerr): If MALLOC_CHECK_={5,7}, print the error message rather than program name. 2005-02-21 Ulrich Drepper <drepper@redhat.com>
* Update.Ulrich Drepper2005-01-071-3/+5
| | | | | * malloc/malloc.c (malloc_printerr): Print program name as part of error message.
* (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.Ulrich Drepper2004-12-221-304/+70
|
* 2.5-18.1Jakub Jelinek2007-07-121-70/+304
|
* Update.Ulrich Drepper2004-12-111-16/+29
| | | | | | | | | | 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.
* Update.Ulrich Drepper2004-12-101-2/+13
| | | | | | | 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.
* Update.Ulrich Drepper2004-11-201-1/+9
| | | | | * malloc/malloc.c (_int_malloc): Check for corruption of chunk which is about to be returned.
* Update.Ulrich Drepper2004-11-191-1/+14
| | | | | | | | | 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.
* Update. cvs/fedora-glibc-20041115T0915Ulrich Drepper2004-11-131-1/+3
| | | | | | | | 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.
* Update.Ulrich Drepper2004-11-131-7/+1
| | | | | | | | | | | | | 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.
* Update.Ulrich Drepper2004-11-131-155/+153
| | | | | * malloc/malloc.c (_int_free): Remove test for NULL parameter. (_int_realloc): Call _int_free only if memory parameter is not NULL.
* Update.Ulrich Drepper2004-11-131-37/+11
| | | | | | | | | | | | | | | | | | 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.
* Update.Ulrich Drepper2004-10-301-7/+19
| | | | | | | | | | | 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.
* [BZ #77]Ulrich Drepper2004-10-141-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Update.Ulrich Drepper2004-10-061-0/+4
| | | | | | | * 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.
* (public_vALLOc): Add missing use of hooks. (public_pVALLOc): Likewise.Ulrich Drepper2004-10-011-2/+18
|
* Update.Ulrich Drepper2004-09-231-1/+8
| | | | * malloc/malloc.c (malloc_printerr): Use syslog if writev failed.
* nt_free): Only do arena boundary check for contiguous arenas.Ulrich Drepper2004-09-101-2/+3
|
* Update.Ulrich Drepper2004-09-091-7/+14
| | | | | | | | | | 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.
* (_int_free): Add inexpensive double free and memory corruption tests. ↵Ulrich Drepper2004-09-091-24/+50
| | | | (malloc_printf_nc): Renamed to malloc_printerr. Second parameter is no format string anymore. Don't use stdio. Adjust all callers.
* Update.Ulrich Drepper2004-09-091-0/+7
| | | | | | 2004-09-08 Ulrich Drepper <drepper@redhat.com> * malloc/malloc.c (_int_free): Add inexpensive double free test.
* Update.Ulrich Drepper2004-09-081-13/+10
| | | | | | | | | | 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.
* Update.Ulrich Drepper2004-08-211-15/+46
| | | | | | | | | | | | | | * 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.
* Update.Ulrich Drepper2004-08-131-10/+12
| | | | | | | | | | 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.
* Update.Ulrich Drepper2004-03-191-1/+3
| | | | | | | 2004-03-18 Ulrich Drepper <drepper@redhat.com> * malloc/malloc.c (__posix_memalign): Correct alignment check. Reported by Don Heller <dheller@cse.psu.edu>.
* Update.Ulrich Drepper2004-03-051-3/+26
| | | | * malloc/malloc.c: Don't call exported interface in the implementation.
* Update.Ulrich Drepper2003-12-171-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Update.Ulrich Drepper2003-09-301-2/+3
| | | | | | | | | | | | | | | | | | 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.
* Update.Ulrich Drepper2003-09-231-0/+2
| | | | | | 2003-09-22 Ulrich Drepper <drepper@redhat.com> * malloc/malloc.c: Include <stdint.h>.
* Update.Ulrich Drepper2003-09-121-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Update.Ulrich Drepper2003-09-081-5/+6
| | | | | | | | | 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.
* Update.Ulrich Drepper2003-08-191-2/+8
| | | | | * stdio-common/test-vfprintf.c (main): Don't write temporary file into source directory.
* Update.Ulrich Drepper2003-08-191-0/+7
| | | | | * malloc/malloc.c (_int_free): Add cheap test for some invalid block sizes.
* Update.Ulrich Drepper2003-06-181-0/+2
| | | | | | | * malloc/malloc.c (public_mALLINFo): Initialize malloc if it hasn't happened yet. Fix completely broken implementation. The second parameter is of
* Update.Ulrich Drepper2003-05-011-0/+2
| | | | | | | | | | 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.
* (mEMALIGn): Define alias __memalign_internal. (__posix_memalign): Use ↵Ulrich Drepper2003-04-301-3/+4
| | | | __memalign_internal instead of memalign.
* Update.Ulrich Drepper2003-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* * include/fcntl.h: Declare __libc_creat.Roland McGrath2003-01-131-14/+14
| | | | | | | | | | * 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.
* Update.Ulrich Drepper2003-01-071-14/+14
| | | | | | 2003-01-06 Ulrich Drepper <drepper@redhat.com> * malloc/malloc.c: Makr all _int_* functions as static.
* Update.Ulrich Drepper2002-12-181-0/+2
| | | | * malloc/malloc.c (mALLOPt): Make sure malloc is initialized.
* * sysdeps/generic/libc-tls.c (__libc_setup_tls): Cope with zero ALIGN.Roland McGrath2002-12-061-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* * malloc/malloc.c [! MALLOC_DEBUG] (assert): #undef before defining.Roland McGrath2002-09-291-0/+1
| | | | * sysdeps/mach/hurd/Versions (ld: GLIBC_2.2.6): Add __errno_location.
* 2002-08-26 Brian Youmans <3diff@gnu.org>Roland McGrath2002-08-261-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.