Page MenuHomeFreeBSD

cdefs: add bounds-safety annotation macros
AcceptedPublic

Authored by abhijeetsharma2002_gmail.com on Wed, Aug 19, 11:52 AM.
Tags
None
Referenced Files
F168635314: D58983.diff
Sat, Aug 29, 9:04 AM
F168565510: D58983.diff
Sat, Aug 29, 1:30 AM
Unknown Object (File)
Thu, Aug 27, 10:02 PM
Unknown Object (File)
Thu, Aug 27, 5:39 PM
Unknown Object (File)
Thu, Aug 27, 4:05 PM
Unknown Object (File)
Thu, Aug 27, 4:03 PM
Unknown Object (File)
Wed, Aug 26, 12:41 PM
Unknown Object (File)
Wed, Aug 26, 8:47 AM
Subscribers

Details

Reviewers
rpaulo
emaste
imp
Summary

Define the -fbounds-safety vocabulary (counted_by, sized_by,
__single, the forge escape hatches). Every macro expands to nothing
under compilers without the extension, so the annotated tree builds
unchanged with the stock toolchain.

Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 75736
Build 72619: arc lint + arc unit

Event Timeline

Ah! I complained that these were missing from a prior review, but they are just what I was hoping for.

This revision is now accepted and ready to land.Wed, Aug 19, 7:24 PM
sys/sys/cdefs.h
408

Can you explain why these are under a different feature? What happens when one feature is ON but the other is off?

426

This is probably not going to be enough because you may need to add __indexable to static inline functions in headers which are going to be used by both compilers.