[Lldb-commits] [lldb] [lldb] Ensure that TestMemoryCache.py reads allocated memory (PR #151635)
Igor Kudrin via lldb-commits
lldb-commits at lists.llvm.org
Thu Jul 31 20:54:02 PDT 2025
https://github.com/igorkudrin created https://github.com/llvm/llvm-project/pull/151635
The test reads 400 bytes of memory above the local variable. If the stack is shallow, this can reach non-allocated space, resulting in a test failure.
>From e6bb5f48978f4eabc9e49176eb3ffd04f2f0e66c Mon Sep 17 00:00:00 2001
From: Igor Kudrin <ikudrin at accesssoftek.com>
Date: Thu, 31 Jul 2025 20:39:15 -0700
Subject: [PATCH] [lldb] Ensure that TestMemoryCache.py reads allocated memory
The test reads 400 bytes of memory above the local variable. If the
stack is shallow, this can reach non-allocated space, resulting in a
test failure.
---
lldb/test/API/functionalities/memory/cache/main.cpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lldb/test/API/functionalities/memory/cache/main.cpp b/lldb/test/API/functionalities/memory/cache/main.cpp
index 44d85c5e9d2c3..a539e48c2cdf4 100644
--- a/lldb/test/API/functionalities/memory/cache/main.cpp
+++ b/lldb/test/API/functionalities/memory/cache/main.cpp
@@ -1,5 +1,11 @@
-int main ()
+int test()
{
int my_ints[] = {0x42};
return 0; // Set break point at this line.
}
+
+int main ()
+{
+ int dummy[100];
+ return test();
+}
More information about the lldb-commits
mailing list