-
Notifications
You must be signed in to change notification settings - Fork 217
[Sanitizers] Add support for -sanitize=memtag-stack #2016
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
[Sanitizers] Add support for -sanitize=memtag-stack #2016
Conversation
kateinoigakukun
left a comment
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.
Overall looks good to me, modulo the missing optional guard
| ) throws -> String? { | ||
| let environment = (targetTriple.environment == .android) ? "-android" : "" | ||
| return "libclang_rt.\(sanitizer.libraryName)-\(targetTriple.archName)\(environment).a" | ||
| return "libclang_rt.\(sanitizer.runtimeLibraryName)-\(targetTriple.archName)\(environment).a" |
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.
| return "libclang_rt.\(sanitizer.runtimeLibraryName)-\(targetTriple.archName)\(environment).a" | |
| guard let runtimeLibraryName = sanitizer.runtimeLibraryName else { return nil } | |
| return "libclang_rt.\(runtimeLibraryName)-\(targetTriple.archName)\(environment).a" |
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.
Thanks for the review! Good spot, I have added the guard now.
|
@swift-ci please test |
This sanitizer adds MTE (memory tagging extension) checks to stack variable accesses. Enablement simply requires setting an attribute on function definitions, and the instrumentation is added by LLVM. The corresponding swift-driver change is at: swiftlang/swift-driver#2016. rdar://161721201
|
@swift-ci please test |
This sanitizer adds MTE (memory tagging extension) checks to stack variable accesses. It does not have a runtime library component, so some changes have been made to the driver logic to account for this cleanly.
d8c9c31 to
f474ff0
Compare
|
@swift-ci please test |
|
@swift-ci please test windows |
This sanitizer adds MTE (memory tagging extension) checks to stack variable accesses. It does not have a runtime library component, so some changes have been made to the driver logic to account for this cleanly.
The corresponding Swift change is at: swiftlang/swift#85515.
rdar://161721201