mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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: https://github.com/swiftlang/swift-driver/pull/2016. rdar://161721201
31 lines
1.1 KiB
C++
31 lines
1.1 KiB
C++
//===--- Sanitizers.def - Swift Sanitizers ß----------------------*- C++ -*-===//
|
|
//
|
|
// This source file is part of the Swift.org open source project
|
|
//
|
|
// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors
|
|
// Licensed under Apache License v2.0 with Runtime Library Exception
|
|
//
|
|
// See https://swift.org/LICENSE.txt for license information
|
|
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file defines the sanitizers supported by Swift.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef SANITIZER
|
|
#error "Define SANITIZER prior to including this file!"
|
|
#endif
|
|
|
|
// SANITIZER(enum_bit, kind, name, file)
|
|
|
|
SANITIZER(0, Address, address, asan)
|
|
SANITIZER(1, Thread, thread, tsan)
|
|
SANITIZER(2, Undefined, undefined, ubsan)
|
|
SANITIZER(3, Fuzzer, fuzzer, fuzzer)
|
|
SANITIZER(4, Scudo, scudo, scudo_standalone)
|
|
SANITIZER(5, MemTagStack, memtag-stack, memtag-stack)
|
|
|
|
#undef SANITIZER
|