Skip to content

Commit 98e9d88

Browse files
committed
[lldb][Target] Remove BoundsSafetyTrapFrameRecognizer
`VerboseTrapFrameRecognizer` recognizes `__builtin_verbose_trap` frames, which is used in newer versions of `-fbounds-safety`. This makes `BoundsSafetyTrapFrameRecognizer` redundant. This patch removes it (but makes sure `VerboseTrapFrameRecognizer` still recognizes the old `-fbounds-safety` frame-names). This also fixes the test failure on Swift CI currently we currently incorrectly pick the `BoundsSafetyTrapFrameRecognizer` because the `__builtin_verbose_trap` message contains the string `Bounds check failed`: ``` /Users/ec2-user/jenkins/workspace/oss-lldb-incremental-macos-cmake/llvm-project/lldb/test/Shell/BoundsSafety/boundssafetytrap.test:5:10: error: CHECK: expected string not found in input ^ <stdin>:1:1: note: scanning from here (lldb) command source -s 0 '/Users/ec2-user/jenkins/workspace/oss-lldb-incremental-macos-cmake/build/Ninja-ReleaseAssert+stdlib-Release/lldb-macosx-x86_64/test/Shell/lit-lldb-init-quiet' ^ <stdin>:11:69: note: possible intended match here * thread #1, queue = 'com.apple.main-thread', stop reason = __clang_trap_msg$Bounds check failed$Dereferencing above bounds ^ ``` (cherry picked from commit 837546237c8e1f557ea829aa3dd320e8391e6a22)
1 parent cb6d38c commit 98e9d88

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

lldb/test/API/lang/BoundsSafety/out_of_bounds_pointer/TestOutOfBoundsPointer.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,9 @@ def partial_oob(self, type_name):
8080
def overflow_oob(self, type_name):
8181
return self.get_idx_var_regex(oob_kind=OOBKind.Overflow, type_name=type_name)
8282

83-
def setUp(self):
84-
TestBase.setUp(self)
85-
if _get_bool_config("ios_disclosed", fail_value=False):
86-
self.build()
87-
8883
def test_bidi_known_type_size(self):
84+
self.build()
85+
8986
(_, self.process, _, bkpt) = lldbutil.run_to_source_breakpoint(
9087
self, r"// break here:.+", lldb.SBFileSpec("bidi_check_known_type_size.c")
9188
)
@@ -154,6 +151,8 @@ def test_bidi_known_type_size(self):
154151
self.expect("frame variable fams2", patterns=[self.bidi_full_oob("FAMS_t *")])
155152

156153
def test_bidi_unknown_type_size(self):
154+
self.build()
155+
157156
(_, self.process, _, bkpt) = lldbutil.run_to_source_breakpoint(
158157
self, r"// break here:.+", lldb.SBFileSpec("bidi_check_unknown_type_size.c")
159158
)
@@ -203,6 +202,8 @@ def test_bidi_unknown_type_size(self):
203202
self.expect("frame variable oob_null", patterns=[self.bidi_full_oob("void *")])
204203

205204
def test_idx_known_type_size(self):
205+
self.build()
206+
206207
(_, self.process, _, bkpt) = lldbutil.run_to_source_breakpoint(
207208
self, r"// break here:.+", lldb.SBFileSpec("idx_check_known_type_size.c")
208209
)
@@ -252,6 +253,8 @@ def test_idx_known_type_size(self):
252253
self.expect("frame variable fams2", patterns=[self.full_oob("FAMS_t *")])
253254

254255
def test_idx_unknown_type_size(self):
256+
self.build()
257+
255258
(_, self.process, _, bkpt) = lldbutil.run_to_source_breakpoint(
256259
self, r"// break here:.+", lldb.SBFileSpec("idx_check_unknown_type_size.c")
257260
)

0 commit comments

Comments
 (0)