Now that we removed all alloca() calls in the repository, add the -Walloca CPPFLAG to trigger a build failure if such stack allocation is used.
Rationale: The ALLOCA(3) man-page mentions its "use is discouraged". Signed-off-by: Philippe Mathieu-Daudé <phi...@redhat.com> --- As there is an alloca() call in libslirp, this patch is pending on the following libslirp patch to be merged: https://lists.freedesktop.org/archives/slirp/2021-May/000150.html (and the submodule updated). --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 4f374b48890..67cb6d5421c 100755 --- a/configure +++ b/configure @@ -552,7 +552,7 @@ ARFLAGS="${ARFLAGS-rv}" # provides these semantics.) QEMU_CFLAGS="-fno-strict-aliasing -fno-common -fwrapv $QEMU_CFLAGS" QEMU_CFLAGS="-Wundef -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS" -QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS" +QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls -Walloca $QEMU_CFLAGS" QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS" # Flags that are needed during configure but later taken care of by Meson -- 2.26.3