OLD | NEW |
1 // Copyright 2014 Google Inc. All Rights Reserved. | 1 // Copyright 2014 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 extern const char kHeapCorruptBlock[]; | 83 extern const char kHeapCorruptBlock[]; |
84 extern const char kCorruptHeap[]; | 84 extern const char kCorruptHeap[]; |
85 | 85 |
86 enum AsanFeature : uint32_t { | 86 enum AsanFeature : uint32_t { |
87 ASAN_FEATURE_ENABLE_PAGE_PROTECTIONS = (1 << 0), | 87 ASAN_FEATURE_ENABLE_PAGE_PROTECTIONS = (1 << 0), |
88 // This feature flag is currently deprecated and ignored. | 88 // This feature flag is currently deprecated and ignored. |
89 DEPRECATED_ASAN_FEATURE_ENABLE_CTMALLOC = (1 << 1), | 89 DEPRECATED_ASAN_FEATURE_ENABLE_CTMALLOC = (1 << 1), |
90 ASAN_FEATURE_ENABLE_LARGE_BLOCK_HEAP = (1 << 2), | 90 ASAN_FEATURE_ENABLE_LARGE_BLOCK_HEAP = (1 << 2), |
91 // This feature flag is currently deprecated and ignored. | 91 // This feature flag is currently deprecated and ignored. |
92 DEPRECATED_ASAN_FEATURE_ENABLE_KASKO = (1 << 3), | 92 DEPRECATED_ASAN_FEATURE_ENABLE_KASKO = (1 << 3), |
93 ASAN_FEATURE_MAX = (1 << 4), | 93 ASAN_FEATURE_ENABLE_CRASHPAD = (1 << 4), |
| 94 ASAN_FEATURE_MAX = (1 << 5), |
94 }; | 95 }; |
95 using AsanFeatureSet = uint32_t; | 96 using AsanFeatureSet = uint32_t; |
96 | 97 |
97 // Feature set for all valid features. | 98 // Feature set for all valid features. |
98 const AsanFeatureSet kAsanValidFeatures = | 99 const AsanFeatureSet kAsanValidFeatures = |
99 ASAN_FEATURE_ENABLE_PAGE_PROTECTIONS | ASAN_FEATURE_ENABLE_LARGE_BLOCK_HEAP; | 100 ASAN_FEATURE_ENABLE_PAGE_PROTECTIONS | |
| 101 ASAN_FEATURE_ENABLE_LARGE_BLOCK_HEAP | ASAN_FEATURE_ENABLE_CRASHPAD; |
100 | 102 |
101 // Feature set for all deprecated features. | 103 // Feature set for all deprecated features. |
102 const AsanFeatureSet kAsanDeprecatedFeatures = | 104 const AsanFeatureSet kAsanDeprecatedFeatures = |
103 DEPRECATED_ASAN_FEATURE_ENABLE_CTMALLOC | | 105 DEPRECATED_ASAN_FEATURE_ENABLE_CTMALLOC | |
104 DEPRECATED_ASAN_FEATURE_ENABLE_KASKO; | 106 DEPRECATED_ASAN_FEATURE_ENABLE_KASKO; |
105 | 107 |
106 // Store the information that we want to report about a block. | 108 // Store the information that we want to report about a block. |
107 // TODO(sebmarchand): Rename this to avoid the confusion with the BlockInfo | 109 // TODO(sebmarchand): Rename this to avoid the confusion with the BlockInfo |
108 // structure? | 110 // structure? |
109 struct AsanBlockInfo { | 111 struct AsanBlockInfo { |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 // struct. | 310 // struct. |
309 // @param protobuf The filled in error information protobuf. | 311 // @param protobuf The filled in error information protobuf. |
310 // @param value The uninitialized AsanErrorInfo struct to be populated. | 312 // @param value The uninitialized AsanErrorInfo struct to be populated. |
311 void CrashdataProtobufToErrorInfo(const crashdata::Value& protobuf, | 313 void CrashdataProtobufToErrorInfo(const crashdata::Value& protobuf, |
312 AsanErrorInfo* error_info); | 314 AsanErrorInfo* error_info); |
313 | 315 |
314 } // namespace asan | 316 } // namespace asan |
315 } // namespace agent | 317 } // namespace agent |
316 | 318 |
317 #endif // SYZYGY_AGENT_ASAN_ERROR_INFO_H_ | 319 #endif // SYZYGY_AGENT_ASAN_ERROR_INFO_H_ |
OLD | NEW |