HomeFreeBSD

Make p_vaddr % p_align == p_offset % p_align for (some) TLS segments.

Description

Make p_vaddr % p_align == p_offset % p_align for (some) TLS segments.

See https://sourceware.org/bugzilla/show_bug.cgi?id=24606 for the test case.
See https://reviews.llvm.org/D64930 for the background and more discussion.

Also this fixes another bug in malloc_aligned() where total size of
the allocated memory might be not enough to fit the aligned requested
block after the initial pointer is incremented by the pointer size.

Reviewed by: bdragon
Tested by: antoine (exp-run PR 244866), bdragon, emaste
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D21163

Details

Provenance
kibAuthored on
Reviewer
bdragon
Differential Revision
D21163: Make p_vaddr % p_align == p_offset % p_align for TLS segments.
Parents
rS359633: Add a manpage for smbios(4).
Branches
Unknown
Tags
Unknown