Skip to content

Conversation

@DanBlackwell
Copy link

@DanBlackwell DanBlackwell commented Nov 14, 2025

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

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.
Copy link
Member

@kateinoigakukun kateinoigakukun left a 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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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"

Copy link
Author

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.

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.

2 participants