[libunwind] [libunwind] include alloca.h in test/aarch64_za_unwind.pass.cpp (PR #207376)
Shreeyash Pandey via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 7 02:03:46 PDT 2026
https://github.com/bojle updated https://github.com/llvm/llvm-project/pull/207376
>From 6c8f788033b5f45e429a28722a5a56207ed15b70 Mon Sep 17 00:00:00 2001
From: Shreeyash Pandey <shrpand at qti.qualcomm.com>
Date: Fri, 3 Jul 2026 04:34:17 -0700
Subject: [PATCH] [libunwind] include alloca.h in
test/aarch64_za_unwind.pass.cpp
Glibc provides the alloca function as a part of stdlib.h when
_GNU_SOURCE is declared (which is the case with standard linux builds).
[1]
On non-glibc systems, this may not be the case (for example, picolibc).
These libraries may not implicitly include alloca.h as a part of the
standard lib.
[1] https://github.com/bminor/glibc/blob/04e750e75b73957cf1c791535a3f4319534a52fc/stdlib/stdlib.h#L728
Signed-off-by: Shreeyash Pandey <shrpand at qti.qualcomm.com>
---
libunwind/test/aarch64_za_unwind.pass.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/libunwind/test/aarch64_za_unwind.pass.cpp b/libunwind/test/aarch64_za_unwind.pass.cpp
index 36536860c1a96..7de9089af75f7 100644
--- a/libunwind/test/aarch64_za_unwind.pass.cpp
+++ b/libunwind/test/aarch64_za_unwind.pass.cpp
@@ -13,6 +13,7 @@
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
+#include <alloca.h>
#include <string.h>
#if defined(__APPLE__)
#include <sys/sysctl.h>
More information about the cfe-commits
mailing list