OLD | NEW |
1 // Copyright 2016 Google Inc. All Rights Reserved. | 1 // Copyright 2016 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 EXPORT_INTERCEPTOR(16, suffix, address_space_size) \ | 73 EXPORT_INTERCEPTOR(16, suffix, address_space_size) \ |
74 EXPORT_INTERCEPTOR(32, suffix, address_space_size) | 74 EXPORT_INTERCEPTOR(32, suffix, address_space_size) |
75 | 75 |
76 #ifdef _WIN64 | 76 #ifdef _WIN64 |
77 namespace { | 77 namespace { |
78 const size_t ONE_TB = static_cast<size_t>(1) << 40; | 78 const size_t ONE_TB = static_cast<size_t>(1) << 40; |
79 } | 79 } |
80 #endif | 80 #endif |
81 | 81 |
82 extern "C" { | 82 extern "C" { |
| 83 void asan_init() { |
| 84 return; |
| 85 } |
| 86 |
| 87 void* asan_get_shadow_memory_dynamic_address() { |
| 88 return nullptr; |
| 89 NOTREACHED(); |
| 90 } |
| 91 |
| 92 // Currently this is a dummy function. |
| 93 // Returning zero means do not detect stack use after return. |
| 94 // TODO (njanevsk): Implement this function. |
| 95 int asan_should_detect_stack_use_after_return() { |
| 96 return 0; |
| 97 } |
| 98 |
| 99 // Currently this is a dummy function. |
| 100 // This one always returns 0. |
| 101 // TODO (njanevsk): Implement this function. |
| 102 int asan_set_seh_filter() { |
| 103 return 0; |
| 104 } |
| 105 |
| 106 // TODO (njanevsk): Implement this function. |
| 107 void asan_version_mismatch_check_v8() { |
| 108 return; |
| 109 } |
| 110 |
| 111 // TODO (njanevsk): Implement this function. |
83 void asan_clang_no_check(const void*) { | 112 void asan_clang_no_check(const void*) { |
84 return; | 113 return; |
85 } | 114 } |
| 115 |
| 116 // TODO (njanevsk): Implement this function. |
| 117 void asan_handle_no_return() { |
| 118 } |
| 119 |
86 #ifdef _WIN64 | 120 #ifdef _WIN64 |
87 void asan_string_no_check() { | 121 void asan_string_no_check() { |
88 return; | 122 return; |
89 } | 123 } |
90 const void* asan_shadow_references[] = {nullptr}; | 124 const void* asan_shadow_references[] = {nullptr}; |
91 EXPORT_INTERCEPTORS_ALL_SIZES(8tb, 8 * ONE_TB - 1) | 125 EXPORT_INTERCEPTORS_ALL_SIZES(8tb, 8 * ONE_TB - 1) |
92 EXPORT_INTERCEPTORS_ALL_SIZES(128tb, 128 * ONE_TB - 1) | 126 EXPORT_INTERCEPTORS_ALL_SIZES(128tb, 128 * ONE_TB - 1) |
93 #else | 127 #else |
94 EXPORT_INTERCEPTORS_ALL_SIZES(2gb, 0x7FFFFFFF) | 128 EXPORT_INTERCEPTORS_ALL_SIZES(2gb, 0x7FFFFFFF) |
95 EXPORT_INTERCEPTORS_ALL_SIZES(4gb, 0xFFFFFFFF) | 129 EXPORT_INTERCEPTORS_ALL_SIZES(4gb, 0xFFFFFFFF) |
96 #endif | 130 #endif |
97 } | 131 } |
98 | 132 |
99 #endif // SYZYGY_AGENT_ASAN_MEMORY_INTERCEPTORS_IMPL_H_ | 133 #endif // SYZYGY_AGENT_ASAN_MEMORY_INTERCEPTORS_IMPL_H_ |
OLD | NEW |