https://github.com/qiyao created 
https://github.com/llvm/llvm-project/pull/214448

`test_memory_reads_when_examining_frame0_locals` asserts that examining
frame 0's locals reads no stack memory, which only holds when debugserver
expedites the stopped frame's stack in `jThreadsInfo`.  That is
added in b631e0cbd1c9, so the assertion only holds for an in-tree
debugserver.

The GreenDragon `lldb-cmake-sanitized` bot configures with
`-DLLDB_USE_SYSTEM_DEBUGSERVER=ON`, so it tests against the debugserver
shipped in Xcode.  That one predates the expedite, so test fails:

```
FAIL: test_memory_reads_when_examining_frame0_locals
AssertionError: 2 != 0 : expected NO stack memory reads for frame 0 (its
stack is expedited in jThreadsInfo).
memory reads while examining locals: stack=2 heap=1 other=1 (total=4)
  stack region: [0x16b540000,0x16f53c000)
  stack reads:  [0x16f53ac00,0x16f53ae00), [0x16f53aa00,0x16f53ac00)
```

It adds `@skipIfOutOfTreeDebugserver` to
`test_memory_reads_when_examining_frame0_locals`.  The other three tests
in the file pass there because they only rely on the frame pointer
backchain expedite, which is old enough to be in the shipped debugserver.


>From dc973496ebd2cd3da7f9d9ef1bb7819842de4bc0 Mon Sep 17 00:00:00 2001
From: Yao Qi <[email protected]>
Date: Thu, 6 Aug 2026 11:25:23 +0100
Subject: [PATCH] [lldb][test] Skip the frame 0 expedite test with an
 out-of-tree debugserver

`test_memory_reads_when_examining_frame0_locals` asserts that examining
frame 0's locals reads no stack memory, which only holds when debugserver
expedites the stopped frame's stack in `jThreadsInfo`.  That is
added in b631e0cbd1c9, so the assertion only holds for an in-tree
debugserver.

The GreenDragon `lldb-cmake-sanitized` bot configures with
`-DLLDB_USE_SYSTEM_DEBUGSERVER=ON`, so it tests against the debugserver
shipped in Xcode.  That one predates the expedite, so test fails:

```
FAIL: test_memory_reads_when_examining_frame0_locals
AssertionError: 2 != 0 : expected NO stack memory reads for frame 0 (its
stack is expedited in jThreadsInfo).
memory reads while examining locals: stack=2 heap=1 other=1 (total=4)
  stack region: [0x16b540000,0x16f53c000)
  stack reads:  [0x16f53ac00,0x16f53ae00), [0x16f53aa00,0x16f53ac00)
```

It adds `@skipIfOutOfTreeDebugserver` to
`test_memory_reads_when_examining_frame0_locals`.  The other three tests
in the file pass there because they only rely on the frame pointer
backchain expedite, which is old enough to be in the shipped debugserver.
---
 .../macosx/expedited-stack-memory/TestExpeditedStackMemory.py    | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/lldb/test/API/macosx/expedited-stack-memory/TestExpeditedStackMemory.py 
b/lldb/test/API/macosx/expedited-stack-memory/TestExpeditedStackMemory.py
index 486b88ea70e04..6fb31be4f379e 100644
--- a/lldb/test/API/macosx/expedited-stack-memory/TestExpeditedStackMemory.py
+++ b/lldb/test/API/macosx/expedited-stack-memory/TestExpeditedStackMemory.py
@@ -47,6 +47,7 @@ def test_memory_reads_during_backtrace_without_cache(self):
         stub, producing memory-read packets."""
         self.check_packets_during_backtrace(disable_memory_cache=True)
 
+    @skipIfOutOfTreeDebugserver
     @requireDarwin
     def test_memory_reads_when_examining_frame0_locals(self):
         """Model an IDE stop: walk the whole stack (a backtrace / debug

_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to