Skip to content

Commit 55c2b27

Browse files
authored
[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.
1 parent dc90472 commit 55c2b27

File tree

1 file changed

+8
-4
lines changed
  • lldb/test/API/functionalities/memory/cache

1 file changed

+8
-4
lines changed
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
int main ()
2-
{
3-
int my_ints[] = {0x42};
4-
return 0; // Set break point at this line.
1+
int test() {
2+
int my_ints[] = {0x42};
3+
return 0; // Set break point at this line.
4+
}
5+
6+
int main() {
7+
int dummy[100];
8+
return test();
59
}

0 commit comments

Comments
 (0)