================ @@ -0,0 +1,480 @@ +============================================== +-fbounds-safety: Enforcing bounds safety for C +============================================== + +.. contents:: + :local: + +Overview +======== + +-fbounds-safety is a C extension to enforce bounds safety to prevent out-of-bounds (OOB) memory accesses, which remain a major source of security vulnerabilities in C. -fbounds-safety aims to eliminate this class of bugs by turning OOB accesses into deterministic traps. + +The -fbounds-safety extension offers bounds annotations that programmers can use to attach bounds to pointers. For example, programmers can add the __counted_by(N) annotation to parameter ptr, indicating that the pointer has N valid elements: ---------------- delcypher wrote:
Should `__counted_by(...)` and other attributes be quoted to be monospaced? https://github.com/llvm/llvm-project/pull/70749 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits