Skip to content

Commit a57249d

Browse files
committed
Add a check for a linker bug which will cause the test to fail.
1 parent c36e679 commit a57249d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lldb/test/API/macosx/branch-islands/TestBranchIslands.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,18 @@ def do_test(self):
2727
# Make sure that we did manage to generate a branch island for foo:
2828
syms = target.FindSymbols("foo.island", lldb.eSymbolTypeCode)
2929
self.assertEqual(len(syms), 1, "We did generate an island for foo")
30+
# There's a bug in the Xcode 15.2 linker, where it did not emit
31+
# "function starts" entries for the branch island symbols, which
32+
# causes lldb to set the range of the previous non-island symbol to
33+
# encompass the range of the branch island symbols. If we encounter
34+
# that bug, then we won't successfully do the step in. Test for
35+
# that here - if the symbol doesn't round-trip from
36+
# name->address->name then the rest of the test can't pass.
37+
island_sym_ctx = syms[0]
38+
sym_addr = island_sym_ctx.symbol.addr
39+
resolved_name = sym_addr.symbol.name
40+
if resolved_name != "foo.island":
41+
return
3042

3143
thread.StepInto()
3244
stop_frame = thread.frames[0]

0 commit comments

Comments
 (0)