* lib/malloca.c (small_t): Verify that it is wide enough.
* modules/malloca (Depends-on): Add verify.
+2018-02-02 Paul Eggert <eggert@cs.ucla.edu>
+
+ malloca: Add a compile-time verification.
+ * lib/malloca.c (small_t): Verify that it is wide enough.
+ * modules/malloca (Depends-on): Add verify.
+
2018-02-02 Bruno Haible <bruno@clisp.org>
malloca: Add an argument check.
/* Specification. */
#include "malloca.h"
+#include "verify.h"
+
/* 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
/* Type for holding very small pointer differences. */
typedef unsigned char small_t;
+/* Verify that it is wide enough. */
+verify (2 * sa_alignment_max - 1 <= (small_t) -1);
void *
mmalloca (size_t n)
Depends-on:
alloca-opt
stdint
+verify
xalloc-oversized
configure.ac: