From 44a3eaeba04ef78835ca741592c376428ada5f71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sat, 2 Dec 2017 10:30:25 +0100 Subject: New upstream version 0.9.8 --- lib/malloca.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'lib/malloca.c') diff --git a/lib/malloca.c b/lib/malloca.c index f1c387f..0e86b1b 100644 --- a/lib/malloca.c +++ b/lib/malloca.c @@ -1,5 +1,5 @@ /* Safe automatic memory allocation. - Copyright (C) 2003, 2006-2007, 2009-2016 Free Software Foundation, Inc. + Copyright (C) 2003, 2006-2007, 2009-2017 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software: you can redistribute it and/or @@ -22,7 +22,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + along with this program; if not, see . */ #define _GL_USE_STDLIB_ALLOC 1 #include @@ -34,6 +34,16 @@ #include "verify.h" +/* Silence a warning from clang's MemorySanitizer. */ +#if defined __has_feature +# if __has_feature(memory_sanitizer) +# define NO_SANITIZE_MEMORY __attribute__((no_sanitize("memory"))) +# endif +#endif +#ifndef NO_SANITIZE_MEMORY +# define NO_SANITIZE_MEMORY +#endif + /* The speed critical point in this file is freea() applied to an alloca() result: it must be fast, to match the speed of alloca(). The speed of mmalloca() and freea() in the other case are not critical, because they @@ -121,7 +131,7 @@ mmalloca (size_t n) } #if HAVE_ALLOCA -void +void NO_SANITIZE_MEMORY freea (void *p) { /* mmalloca() may have returned NULL. */ -- cgit v1.2.3