[Lldb-commits] [lldb] [lldb][test] Add stack frame padding to fix flaky DIL array subscript test (PR #141738)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Wed May 28 07:23:40 PDT 2025


================
@@ -19,8 +19,6 @@ def expect_var_path(self, expr, compare_to_framevar=False, value=None, type=None
             self.runCmd("settings set target.experimental.use-DIL true")
             self.assertEqual(value_dil.GetValue(), value_frv.GetValue())
 
-    # int_arr[100] sometimes points to above the stack region, fix coming soon.
----------------
labath wrote:

I believe the point of this test is to check that the expression really allows you to go beyond the array bounds, so fixing this by ensuring the memory at that address exists is the right thing to do. However, I think the index 100 is unnecessarily big. I think we could just change the test to use indexes 3 and 10 (a "one past" and "reasonably beyond" value), and then you don't need to write the very long comment.

Printing `<unavailable>` or similar when this indexing lands you into unaddressable memory would be nice (maybe it happens already -- I don't know), but that's a different test.

https://github.com/llvm/llvm-project/pull/141738


More information about the lldb-commits mailing list