[libunwind] [libunwind] include alloca.h in test/aarch64_za_unwind.pass.cpp (PR #207376)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 3 04:36:41 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libunwind
Author: Shreeyash Pandey (bojle)
<details>
<summary>Changes</summary>
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
---
Full diff: https://github.com/llvm/llvm-project/pull/207376.diff
1 Files Affected:
- (modified) libunwind/test/aarch64_za_unwind.pass.cpp (+1)
``````````diff
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>
``````````
</details>
https://github.com/llvm/llvm-project/pull/207376
More information about the cfe-commits
mailing list