[Lldb-commits] [lldb] [lldb] Ensure that TestMemoryCache.py reads allocated memory (PR #151635)
via lldb-commits
lldb-commits at lists.llvm.org
Thu Jul 31 20:54:29 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Igor Kudrin (igorkudrin)
<details>
<summary>Changes</summary>
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.
---
Full diff: https://github.com/llvm/llvm-project/pull/151635.diff
1 Files Affected:
- (modified) lldb/test/API/functionalities/memory/cache/main.cpp (+7-1)
``````````diff
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();
+}
``````````
</details>
https://github.com/llvm/llvm-project/pull/151635
More information about the lldb-commits
mailing list