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
F157362836: D53821.id166754.diff
Wed, May 20, 3:16 PM
F157305125: D53821.id167178.diff
Wed, May 20, 4:28 AM
F157256455: D53821.id.diff
Tue, May 19, 6:40 PM
Unknown Object (File)
Sun, May 17, 9:13 AM
Unknown Object (File)
Fri, May 15, 4:51 AM
Unknown Object (File)
Thu, May 7, 11:43 PM
Unknown Object (File)
Tue, Apr 28, 3:40 PM
Unknown Object (File)
Mon, Apr 27, 10:45 PM
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.