From 740ec3572bb4a587a287cdcea201f12fa5f00501 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Wed, 30 May 2018 11:40:42 -0700 Subject: malloc: simplify nasm_malloc code, add nasm_strcatn() Simplify the nasm_malloc() code by moving the pointer check into a common subroutine. We can now issue a filename error even for failures like malloc(). Add support for the gcc sentinel attribute (verify that a list ends with NULL). Add a handful of safe_alloc attributes. Signed-off-by: H. Peter Anvin --- configure.ac | 1 + 1 file changed, 1 insertion(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 44c9e179..40a6f62c 100644 --- a/configure.ac +++ b/configure.ac @@ -220,6 +220,7 @@ PA_FUNC_ATTRIBUTE(noreturn) PA_FUNC_ATTRIBUTE(returns_nonnull) PA_FUNC_ATTRIBUTE(malloc) PA_FUNC_ATTRIBUTE(alloc_size, (1)) +PA_FUNC_ATTRIBUTE(sentinel,,, [const char *, ...], ["a","b",NULL]) PA_FUNC_ATTRIBUTE(format, [(printf,1,2)], int, [const char *, ...], ["%d",1]) PA_FUNC_ATTRIBUTE(const) PA_FUNC_ATTRIBUTE(pure) -- cgit v1.2.1