git-sbrk-end
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Tue, 6 Jul 2021 19:16:59 +0000 (20:16 +0100)
committerAurelien Jarno <aurel32@debian.org>
Tue, 6 Jul 2021 19:16:59 +0000 (20:16 +0100)
commitb8b932f2d4e96d2f647aef4cba75eb1b5a478832
tree210cfc5f07b40df71d47ebf51b1debb5dadcba56
parent3fe0baf4cdb653e4344f1e8dfe5b597dcf0795f5
git-sbrk-end

Committed for glibc 2.33

commit 8c6beab4e1c03ac57150241015486e3f497c17cc
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Wed Aug 5 23:48:58 2020 +0200

    hurd: Rework sbrk

    Making the brk start exactly at the end of the main application binary was
    requiring to get it through the _end symbol, which does not work any more
    with recent toolchains, and actually produces in libc.so a confusing
    external _end symbol that produces odd results, see
    https://sourceware.org/bugzilla/show_bug.cgi?id=23499

    Trying to do so is quite outdated anyway with the tendency for address
    randomization.

    Using _end was also allowing to include the main binary data within
    the RLIMIT_DATA, but this also seems outdated with dynamic library
    loading, and nowadays' memory consumption via malloc and mmap rather than
    statically-allocated data.

    This adds a BRK_START macro in <vm_param.h> that just tells where we
    want to start the brk, and thus removes the _end symbol.

    * sysdeps/mach/hurd/i386/vm_param.h: New file.
    * sysdeps/mach/hurd/brk.c: Use BRK_START as brk start instead of _end.
    Also ignore __data_start.
    * hurd/Versions: Remove _end symbol.
    * sysdeps/mach/hurd/i386/libc.abilist: Remove _end symbol.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name git-sbrk-end.diff
hurd/Versions
sysdeps/mach/hurd/brk.c
sysdeps/mach/hurd/i386/libc.abilist
sysdeps/mach/hurd/i386/vm_param.h [new file with mode: 0644]