Page MenuHomeFreeBSD

sys/_types.h: add void * to __max_align_t
ClosedPublic

Authored by brooks on Nov 19 2025, 11:18 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jan 21, 9:46 AM
Unknown Object (File)
Sat, Jan 10, 3:22 PM
Unknown Object (File)
Sat, Jan 10, 5:27 AM
Unknown Object (File)
Dec 20 2025, 3:19 AM
Unknown Object (File)
Dec 12 2025, 4:59 PM
Unknown Object (File)
Dec 3 2025, 2:36 AM
Unknown Object (File)
Dec 1 2025, 11:38 AM
Unknown Object (File)
Nov 30 2025, 2:35 AM
Subscribers
None

Details

Summary

Add a pointer member to __max_align_t as pointers may have different
alignment requirements than long long or long double.

Effort: CHERI upstreaming
Sponsored by: Innovate UK

Diff Detail

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

Event Timeline

brooks created this revision.
kib added inline comments.
sys/sys/_types.h
207

Should this be long double?

This revision is now accepted and ready to land.Nov 19 2025, 1:51 PM
sys/sys/_types.h
207

Indeed, that's quite odd. Clang's version uses long double. I'm also not sure why the alignment attributes are used at all since structures members are going to be naturally aligned regardless.

sys/sys/_types.h
207

Might be it is a counter-measure against #pragma packed() around it.

I will post a review to change to long double.

This revision was automatically updated to reflect the committed changes.