OLD | NEW |
1 // Copyright 2012 Google Inc. All Rights Reserved. | 1 // Copyright 2012 Google Inc. All Rights Reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 23 matching lines...) Expand all Loading... |
34 struct AsanFeatureName { | 34 struct AsanFeatureName { |
35 AsanFeature flag; | 35 AsanFeature flag; |
36 const char* name; | 36 const char* name; |
37 }; | 37 }; |
38 | 38 |
39 static const AsanFeatureName kAsanFeatureNames[] = { | 39 static const AsanFeatureName kAsanFeatureNames[] = { |
40 {ASAN_FEATURE_ENABLE_PAGE_PROTECTIONS, "SyzyASANPageProtections"}, | 40 {ASAN_FEATURE_ENABLE_PAGE_PROTECTIONS, "SyzyASANPageProtections"}, |
41 {DEPRECATED_ASAN_FEATURE_ENABLE_CTMALLOC, nullptr}, | 41 {DEPRECATED_ASAN_FEATURE_ENABLE_CTMALLOC, nullptr}, |
42 {ASAN_FEATURE_ENABLE_LARGE_BLOCK_HEAP, "SyzyASANLargeBlockHeap"}, | 42 {ASAN_FEATURE_ENABLE_LARGE_BLOCK_HEAP, "SyzyASANLargeBlockHeap"}, |
43 {DEPRECATED_ASAN_FEATURE_ENABLE_KASKO, nullptr}, | 43 {DEPRECATED_ASAN_FEATURE_ENABLE_KASKO, nullptr}, |
| 44 {ASAN_FEATURE_ENABLE_CRASHPAD, "SyzyASANCrashpad"}, |
44 }; | 45 }; |
45 | 46 |
46 // This lock guards against IAT patching on multiple threads concurrently. | 47 // This lock guards against IAT patching on multiple threads concurrently. |
47 base::Lock patch_lock; | 48 base::Lock patch_lock; |
48 | 49 |
49 // The maximum number of patch attemps to tolerate. | 50 // The maximum number of patch attemps to tolerate. |
50 const size_t kPatchAttempsMax = 10; | 51 const size_t kPatchAttempsMax = 10; |
51 // Counts the number of patch attempts that have occurred. Under patch_lock. | 52 // Counts the number of patch attempts that have occurred. Under patch_lock. |
52 size_t patch_attempts = 0; | 53 size_t patch_attempts = 0; |
53 // Set to true when patching has been successfully accomplished. | 54 // Set to true when patching has been successfully accomplished. |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 } | 240 } |
240 | 241 |
241 // Check that we had names for all the features. | 242 // Check that we had names for all the features. |
242 DCHECK_EQ(0U, enabled_features); | 243 DCHECK_EQ(0U, enabled_features); |
243 } | 244 } |
244 | 245 |
245 } // extern "C" | 246 } // extern "C" |
246 | 247 |
247 } // namespace asan | 248 } // namespace asan |
248 } // namespace agent | 249 } // namespace agent |
OLD | NEW |