Page MenuHomeFreeBSD

rtld_malloc: more accurate handling of mmap(2) failure
ClosedPublic

Authored by kib on Oct 15 2021, 9:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 25, 5:41 AM
Unknown Object (File)
Mon, Nov 25, 1:16 AM
Unknown Object (File)
Sun, Nov 24, 6:46 AM
Unknown Object (File)
Sat, Nov 23, 4:17 AM
Unknown Object (File)
Thu, Nov 21, 7:39 AM
Unknown Object (File)
Tue, Nov 19, 6:40 AM
Unknown Object (File)
Fri, Nov 15, 5:12 PM
Unknown Object (File)
Thu, Nov 14, 12:23 PM
Subscribers

Details

Summary

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>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Oct 15 2021, 9:37 PM
This revision is now accepted and ready to land.Oct 18 2021, 8:16 PM
libexec/rtld-elf/rtld_malloc.c
285

Use NULL instead of zero?