fortify-headers

standalone fortify-source implementation
git clone git://git.2f30.org/fortify-headers
Log | Files | Refs | README | LICENSE

commit c29287d01bceb0a54996be1e138f2e7f62917907
parent bc50ed6c3de76c11b2dde92d0f28dd45941fc327
Author: jvoisin <julien.voisin@dustri.org>
Date:   Sun, 20 Aug 2023 20:28:13 +0200

Make use of pass_dynamic_object_size when available

Diffstat:
Minclude/fortify-headers.h | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/fortify-headers.h b/include/fortify-headers.h @@ -25,7 +25,11 @@ #ifdef __clang__ /* clang uses overloads; see https://github.com/llvm/llvm-project/issues/53516 */ +#if __has_attribute(pass_dynamic_object_size) +#define _FORTIFY_POSN(n) const __attribute__((pass_dynamic_object_size(n))) +#else #define _FORTIFY_POSN(n) const __attribute__((pass_object_size(n))) +#endif /* pass_dynamic_object_size) */ /* we can't use extern inline with overloads without making them external */ #define _FORTIFY_INLINE static __inline__ \ __attribute__((__always_inline__,__artificial__,__overloadable__))