Skip to content

Reland "[lldb][test] Re-enable bounds safety tests" #9986

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 1 commit into from
Feb 11, 2025

Conversation

Michael137
Copy link

Reverts #9970

The tests were failing on Linux due to a missing header and missing __unsafe_forge_ casts.

This patch re-enables the tests and fixes the failures on Linux.

@Michael137 Michael137 requested a review from a team as a code owner February 8, 2025 21:32
@Michael137
Copy link
Author

@swift-ci test

@rapidsna
Copy link

Looks like a test is failing in macOS.

AssertionError: Ran command:
"expr array_of_bounds_safety_pointers"

Got output:
(int *__bidi_indexable[2]) $0 = {
[0] = (ptr: 0x6000036e8010, bounds: 0x6000036e8010..0x6000036e8020)
[1] = (out-of-bounds ptr: 0x000000000000..0x000000000004, bounds: 0x000000000000..0x000000000000)
}

Expecting regex pattern: "[0] = (out-of-bounds ptr: 0x000000000000..0x000000000004, bounds: 0x000000000000..0x000000000000)" (was not found)

Reverts #9970

The tests were failing on Linux due to a missing header and missing `__unsafe_forge_` casts.

This patch re-enables the tests and fixes the failures on Linux.
@Michael137 Michael137 force-pushed the lldb/reland-boundssafety-tests branch from 1c9e40b to 46be0fd Compare February 10, 2025 22:02
@Michael137
Copy link
Author

Looks like a test is failing in macOS.

AssertionError: Ran command: "expr array_of_bounds_safety_pointers"

Got output: (int *__bidi_indexable[2]) $0 = { [0] = (ptr: 0x6000036e8010, bounds: 0x6000036e8010..0x6000036e8020) [1] = (out-of-bounds ptr: 0x000000000000..0x000000000004, bounds: 0x000000000000..0x000000000000) }

Expecting regex pattern: "[0] = (out-of-bounds ptr: 0x000000000000..0x000000000004, bounds: 0x000000000000..0x000000000000)" (was not found)

This was caused by the breakpoint not being set at the right place after i wrapped the malloc with a bounds-safety cast. Fixed in the latest version

@Michael137
Copy link
Author

@swift-ci test

@Michael137 Michael137 merged commit c4039b0 into stable/20240723 Feb 11, 2025
3 checks passed
@Michael137 Michael137 deleted the lldb/reland-boundssafety-tests branch February 11, 2025 23:35
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