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 // TODO (njanevsk): Implement this function. | |
83 void asan_clang_no_check(const void*) { | 111 void asan_clang_no_check(const void*) { |
84 return; | 112 return; |
85 } | 113 } |
114 // TODO (njanevsk): Implement this function. | |
Sébastien Marchand
2017/06/20 22:06:14
Add a BL between each function.
njanevsk
2017/06/21 14:39:30
Done.
| |
115 void asan_handle_no_return() { | |
116 } | |
117 | |
86 #ifdef _WIN64 | 118 #ifdef _WIN64 |
87 void asan_string_no_check() { | 119 void asan_string_no_check() { |
88 return; | 120 return; |
89 } | 121 } |
90 const void* asan_shadow_references[] = {nullptr}; | 122 const void* asan_shadow_references[] = {nullptr}; |
91 EXPORT_INTERCEPTORS_ALL_SIZES(8tb, 8 * ONE_TB - 1) | 123 EXPORT_INTERCEPTORS_ALL_SIZES(8tb, 8 * ONE_TB - 1) |
92 EXPORT_INTERCEPTORS_ALL_SIZES(128tb, 128 * ONE_TB - 1) | 124 EXPORT_INTERCEPTORS_ALL_SIZES(128tb, 128 * ONE_TB - 1) |
93 #else | 125 #else |
94 EXPORT_INTERCEPTORS_ALL_SIZES(2gb, 0x7FFFFFFF) | 126 EXPORT_INTERCEPTORS_ALL_SIZES(2gb, 0x7FFFFFFF) |
95 EXPORT_INTERCEPTORS_ALL_SIZES(4gb, 0xFFFFFFFF) | 127 EXPORT_INTERCEPTORS_ALL_SIZES(4gb, 0xFFFFFFFF) |
96 #endif | 128 #endif |
97 } | 129 } |
98 | 130 |
99 #endif // SYZYGY_AGENT_ASAN_MEMORY_INTERCEPTORS_IMPL_H_ | 131 #endif // SYZYGY_AGENT_ASAN_MEMORY_INTERCEPTORS_IMPL_H_ |
OLD | NEW |