forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request swiftlang#1434 from apple/asan
[asan] Add basic support for Address Sanitizer function instrumentation
- Loading branch information
Showing
18 changed files
with
359 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
//===----- Sanitizers.h - Helpers related to sanitizers --------*- C++ -*-===// | ||
// | ||
// This source file is part of the Swift.org open source project | ||
// | ||
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors | ||
// Licensed under Apache License v2.0 with Runtime Library Exception | ||
// | ||
// See http://swift.org/LICENSE.txt for license information | ||
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors | ||
// | ||
//===---------------------------------------------------------------------===// | ||
|
||
#ifndef SWIFT_BASIC_SANITIZERS_H | ||
#define SWIFT_BASIC_SANITIZERS_H | ||
|
||
namespace swift { | ||
|
||
enum class SanitizerKind : unsigned { | ||
None = 0, | ||
Address, | ||
}; | ||
|
||
} | ||
#endif // SWIFT_BASIC_SANITIZERS_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
//===----- SanitizerOptions.h - Helpers related to sanitizers --*- C++ -*-===// | ||
// | ||
// This source file is part of the Swift.org open source project | ||
// | ||
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors | ||
// Licensed under Apache License v2.0 with Runtime Library Exception | ||
// | ||
// See http://swift.org/LICENSE.txt for license information | ||
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors | ||
// | ||
//===---------------------------------------------------------------------===// | ||
|
||
#ifndef SWIFT_OPTIONS_SANITIZER_OPTIONS_H | ||
#define SWIFT_OPTIONS_SANITIZER_OPTIONS_H | ||
|
||
#include "swift/Basic/Sanitizers.h" | ||
#include "llvm/ADT/Triple.h" | ||
#include "llvm/Option/Arg.h" | ||
|
||
namespace swift { | ||
class DiagnosticEngine; | ||
|
||
/// \brief Parses a -sanitize= argument's values. | ||
/// | ||
/// \param Diag If non null, the argument is used to diagnose invalid values. | ||
/// \return Returns a SanitizerKind. | ||
SanitizerKind parseSanitizerArgValues(const llvm::opt::Arg *A, | ||
const llvm::Triple &Triple, | ||
DiagnosticEngine &Diag); | ||
} | ||
#endif // SWIFT_OPTIONS_SANITIZER_OPTIONS_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.