[Lldb-commits] [lldb] 55c2b27 - [lldb] Ensure that TestMemoryCache.py reads allocated memory (#151635)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 1 12:52:03 PDT 2025
Author: Igor Kudrin
Date: 2025-08-01T12:51:59-07:00
New Revision: 55c2b273ea5d3b949c6431d429a4da20612d9808
URL: https://github.com/llvm/llvm-project/commit/55c2b273ea5d3b949c6431d429a4da20612d9808
DIFF: https://github.com/llvm/llvm-project/commit/55c2b273ea5d3b949c6431d429a4da20612d9808.diff
LOG: [lldb] Ensure that TestMemoryCache.py reads allocated memory (#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. The patch fixes the issue by reserving enough space in
the upper stack frame.
Added:
Modified:
lldb/test/API/functionalities/memory/cache/main.cpp
Removed:
################################################################################
diff --git a/lldb/test/API/functionalities/memory/cache/main.cpp b/lldb/test/API/functionalities/memory/cache/main.cpp
index 44d85c5e9d2c3..5d2683f7adf94 100644
--- a/lldb/test/API/functionalities/memory/cache/main.cpp
+++ b/lldb/test/API/functionalities/memory/cache/main.cpp
@@ -1,5 +1,9 @@
-int main ()
-{
- int my_ints[] = {0x42};
- return 0; // Set break point at this line.
+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