Home
last modified time | relevance | path

Searched hist:c29ee08204ce4106d4992474005c5f2fb7d5fbf1 (Results 1 – 1 of 1) sorted by relevance

/freebsd/libexec/rtld-elf/
H A Drtld_malloc.cdiff 03a7c36ddbc0ddb1063d2c8a37c64d83e1519c55 Wed Sep 06 15:50:27 CEST 2023 Konstantin Belousov <kib@FreeBSD.org> __crt_aligned_alloc_offset(): fix ov_index for backing allocation address

Wrong value of ov_index resulted in magic check failure, and refuse to
free() the memory allocated with __crt_aligned_alloc_offset().
Then the TLS segments of exited threads leaked.

Reported and tested by: glebius
Fixes: c29ee08204ce4106d4992474005c5f2fb7d5fbf1
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
diff c29ee08204ce4106d4992474005c5f2fb7d5fbf1 Sat Jul 22 06:21:45 CEST 2023 Konstantin Belousov <kib@FreeBSD.org> rtld_malloc: add __crt_aligned_alloc_offset()

It is modelled after aligned_alloc(3). Most importantly, to free the
allocation, __crt_free() can be used. Additionally, caller may specify
offset into the aligned allocation, so that we return offset-ed from
alignment pointer.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D41150