-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add support for the Scudo sanitizer. #2717
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
Conversation
@swift-ci please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed out-of-band; we're going to avoid adding an integration test that could fail SwiftPM's tests if scudo
isn't working properly, and instead just test SwiftPM's behavior w/r/t passing sanitizer flags. (There is a separate repo for swift integration tests). @Lukasa also realized that this test would fail nondeterministically due to the way scudo
works. Going back to revise tests.
@swift-ci please smoke test |
@swift-ci please test |
@rballard Ok, I think this is good for re-review. The Linux smoke test failed for what seems to be an unrelated reason, and the full test passed. |
The Swift PR swiftlang/swift#28538 adds support for the Scudo hardened allocator to swiftc. This patch adds support for it to Swift Package Manager, allowing the Package Manager to correctly plumb Scudo through the entire build pipeline. See the aforementioned PR for more discussion on the value of supporting Scudo. (cherry picked from commit 594ccaa)
The current tests for sanitizers in SwiftPM are essentially "live": they build a package that will do something to trigger a sanitizer, and then run it and confirm it fails. This is a pretty fragile way to test, and it exposes SwiftPM to a number of possible test failures that don't have anything to do with the core mission (exposing the sanitizer). This patch replaces those tests with build plan tests that validate that SwiftPM correctly invokes swiftc and clang. These tests are acceptable because for now SwiftPM doesn't have any smarts with the sanitizers: it just passes them all through to swiftc and clang. This patch also deletes the current live tests, as they are no longer necessary. (cherry picked from commit 984618b)
@swift-ci please test |
@swift-ci please smoke test |
The linux platform failure is unrelated to this PR. |
@swift-ci please smoke test |
@swift-ci please test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed the test failure looks unrelated. Changes are good to take; thank you!
The Swift PR swiftlang/swift#28538 adds support for the Scudo hardened
allocator to swiftc. This patch adds support for it to Swift Package
Manager, allowing the Package Manager to correctly plumb Scudo through
the entire build pipeline.
See the aforementioned PR for more discussion on the value of supporting
Scudo.
This is a back port of #2438 to the 5.3 release branch. @rballard, is there any chance of us getting this landed?
(cherry picked from commit 594ccaa)