Skip to content

[lldb][Target] Remove BoundsSafetyTrapFrameRecognizer #9724

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 13, 2024

Conversation

Michael137
Copy link

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
                                                                    ^

@Michael137
Copy link
Author

@swift-ci test

1 similar comment
@Michael137
Copy link
Author

@swift-ci test

`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
                                                                    ^
```
@Michael137 Michael137 force-pushed the lldb-remove-bounds-safety-recognizer branch from 8375462 to c4264d6 Compare December 12, 2024 19:12
This should pass now that we removed the
`BoundsSafetyTrapFrameRecognizer` in favour of the
`VerboseTrapFrameRecognizer`
@Michael137
Copy link
Author

@swift-ci test

@adrian-prantl adrian-prantl merged commit 806859c into stable/20240723 Dec 13, 2024
2 of 3 checks passed
@adrian-prantl adrian-prantl deleted the lldb-remove-bounds-safety-recognizer branch December 13, 2024 21:36
Michael137 added a commit that referenced this pull request Feb 6, 2025
These pass ever since we've fixed the frame recognizer in
#9724.

rdar://141363609
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants