crt_malloc: more accurate handling of mmap(2) failure
authorKonstantin Belousov <kib@FreeBSD.org>
Fri, 15 Oct 2021 17:59:37 +0000 (20:59 +0300)
committerKonstantin Belousov <kib@FreeBSD.org>
Mon, 18 Oct 2021 22:02:47 +0000 (01:02 +0300)
commit73dddffc3175581ba99f6ced9a2e508a0e880e59
tree73e9baf189054e57ede9bc5c7b79b7e0b72ad14e
parente1d6d6f9249d37c10a0df68024c7dacebdc7bf98
crt_malloc: more accurate handling of mmap(2) failure

Reset both pagepool_start and pagepool_end after a mmap(2) failure,
to avoid using invalid pagepool either for allocation or munmap(2).

PR: 259076
Noted by: Denis Koreshkov <dynamic-wind@mail.ru>
Reviewed by: arichardson
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D32514
libexec/rtld-elf/rtld_malloc.c