@@ -31,7 +31,7 @@ extern "C" {
31
31
// /
32
32
// / \param addr Start of memory region.
33
33
// / \param size Size of memory region.
34
- void __sanitizer_cdecl __asan_poison_memory_region (void const volatile *addr,
34
+ void SANITIZER_CDECL __asan_poison_memory_region (void const volatile *addr,
35
35
size_t size);
36
36
37
37
// / Marks a memory region (<c>[addr, addr+size)</c>) as addressable.
@@ -46,7 +46,7 @@ void __sanitizer_cdecl __asan_poison_memory_region(void const volatile *addr,
46
46
// /
47
47
// / \param addr Start of memory region.
48
48
// / \param size Size of memory region.
49
- void __sanitizer_cdecl __asan_unpoison_memory_region (void const volatile *addr,
49
+ void SANITIZER_CDECL __asan_unpoison_memory_region (void const volatile *addr,
50
50
size_t size);
51
51
52
52
// Macros provided for convenience.
@@ -85,7 +85,7 @@ void __sanitizer_cdecl __asan_unpoison_memory_region(void const volatile *addr,
85
85
// /
86
86
// / \retval 1 Address is poisoned.
87
87
// / \retval 0 Address is not poisoned.
88
- int __sanitizer_cdecl __asan_address_is_poisoned (void const volatile *addr);
88
+ int SANITIZER_CDECL __asan_address_is_poisoned (void const volatile *addr);
89
89
90
90
// / Checks if a region is poisoned.
91
91
// /
@@ -95,14 +95,14 @@ int __sanitizer_cdecl __asan_address_is_poisoned(void const volatile *addr);
95
95
// / \param beg Start of memory region.
96
96
// / \param size Start of memory region.
97
97
// / \returns Address of first poisoned byte.
98
- void *__sanitizer_cdecl __asan_region_is_poisoned (void *beg, size_t size);
98
+ void *SANITIZER_CDECL __asan_region_is_poisoned (void *beg, size_t size);
99
99
100
100
// / Describes an address (useful for calling from the debugger).
101
101
// /
102
102
// / Prints the description of <c><i>addr</i></c>.
103
103
// /
104
104
// / \param addr Address to describe.
105
- void __sanitizer_cdecl __asan_describe_address (void *addr);
105
+ void SANITIZER_CDECL __asan_describe_address (void *addr);
106
106
107
107
// / Checks if an error has been or is being reported (useful for calling from
108
108
// / the debugger to get information about an ASan error).
@@ -111,7 +111,7 @@ void __sanitizer_cdecl __asan_describe_address(void *addr);
111
111
// /
112
112
// / \returns 1 if an error has been (or is being) reported. Otherwise returns
113
113
// / 0.
114
- int __sanitizer_cdecl __asan_report_present (void );
114
+ int SANITIZER_CDECL __asan_report_present (void );
115
115
116
116
// / Gets the PC (program counter) register value of an ASan error (useful for
117
117
// / calling from the debugger).
@@ -120,7 +120,7 @@ int __sanitizer_cdecl __asan_report_present(void);
120
120
// / Otherwise returns 0.
121
121
// /
122
122
// / \returns PC value.
123
- void *__sanitizer_cdecl __asan_get_report_pc (void );
123
+ void *SANITIZER_CDECL __asan_get_report_pc (void );
124
124
125
125
// / Gets the BP (base pointer) register value of an ASan error (useful for
126
126
// / calling from the debugger).
@@ -129,7 +129,7 @@ void *__sanitizer_cdecl __asan_get_report_pc(void);
129
129
// / Otherwise returns 0.
130
130
// /
131
131
// / \returns BP value.
132
- void *__sanitizer_cdecl __asan_get_report_bp (void );
132
+ void *SANITIZER_CDECL __asan_get_report_bp (void );
133
133
134
134
// / Gets the SP (stack pointer) register value of an ASan error (useful for
135
135
// / calling from the debugger).
@@ -138,7 +138,7 @@ void *__sanitizer_cdecl __asan_get_report_bp(void);
138
138
// / Otherwise returns 0.
139
139
// /
140
140
// / \returns SP value.
141
- void *__sanitizer_cdecl __asan_get_report_sp (void );
141
+ void *SANITIZER_CDECL __asan_get_report_sp (void );
142
142
143
143
// / Gets the address of the report buffer of an ASan error (useful for calling
144
144
// / from the debugger).
@@ -147,31 +147,31 @@ void *__sanitizer_cdecl __asan_get_report_sp(void);
147
147
// / reported. Otherwise returns 0.
148
148
// /
149
149
// / \returns Address of report buffer.
150
- void *__sanitizer_cdecl __asan_get_report_address (void );
150
+ void *SANITIZER_CDECL __asan_get_report_address (void );
151
151
152
152
// / Gets access type of an ASan error (useful for calling from the debugger).
153
153
// /
154
154
// / Returns access type (read or write) if an error has been (or is being)
155
155
// / reported. Otherwise returns 0.
156
156
// /
157
157
// / \returns Access type (0 = read, 1 = write).
158
- int __sanitizer_cdecl __asan_get_report_access_type (void );
158
+ int SANITIZER_CDECL __asan_get_report_access_type (void );
159
159
160
160
// / Gets access size of an ASan error (useful for calling from the debugger).
161
161
// /
162
162
// / Returns access size if an error has been (or is being) reported. Otherwise
163
163
// / returns 0.
164
164
// /
165
165
// / \returns Access size in bytes.
166
- size_t __sanitizer_cdecl __asan_get_report_access_size (void );
166
+ size_t SANITIZER_CDECL __asan_get_report_access_size (void );
167
167
168
168
// / Gets the bug description of an ASan error (useful for calling from a
169
169
// / debugger).
170
170
// /
171
171
// / \returns Returns a bug description if an error has been (or is being)
172
172
// / reported - for example, "heap-use-after-free". Otherwise returns an empty
173
173
// / string.
174
- const char *__sanitizer_cdecl __asan_get_report_description (void );
174
+ const char *SANITIZER_CDECL __asan_get_report_description (void );
175
175
176
176
// / Gets information about a pointer (useful for calling from the debugger).
177
177
// /
@@ -192,7 +192,7 @@ const char *__sanitizer_cdecl __asan_get_report_description(void);
192
192
// / \param[out] region_size Size of the region in bytes.
193
193
// /
194
194
// / \returns Returns the category of the given pointer as a constant string.
195
- const char *__sanitizer_cdecl __asan_locate_address (void *addr, char *name,
195
+ const char *SANITIZER_CDECL __asan_locate_address (void *addr, char *name,
196
196
size_t name_size,
197
197
void **region_address,
198
198
size_t *region_size);
@@ -209,7 +209,7 @@ const char *__sanitizer_cdecl __asan_locate_address(void *addr, char *name,
209
209
// / \param[out] thread_id The thread ID of the address.
210
210
// /
211
211
// / \returns Returns the number of stored frames or 0 on error.
212
- size_t __sanitizer_cdecl __asan_get_alloc_stack (void *addr, void **trace,
212
+ size_t SANITIZER_CDECL __asan_get_alloc_stack (void *addr, void **trace,
213
213
size_t size, int *thread_id);
214
214
215
215
// / Gets the free stack trace and thread ID for a heap address (useful for
@@ -224,15 +224,15 @@ size_t __sanitizer_cdecl __asan_get_alloc_stack(void *addr, void **trace,
224
224
// / \param[out] thread_id The thread ID of the address.
225
225
// /
226
226
// / \returns Returns the number of stored frames or 0 on error.
227
- size_t __sanitizer_cdecl __asan_get_free_stack (void *addr, void **trace,
227
+ size_t SANITIZER_CDECL __asan_get_free_stack (void *addr, void **trace,
228
228
size_t size, int *thread_id);
229
229
230
230
// / Gets the current shadow memory mapping (useful for calling from the
231
231
// / debugger).
232
232
// /
233
233
// / \param[out] shadow_scale Shadow scale value.
234
234
// / \param[out] shadow_offset Offset value.
235
- void __sanitizer_cdecl __asan_get_shadow_mapping (size_t *shadow_scale,
235
+ void SANITIZER_CDECL __asan_get_shadow_mapping (size_t *shadow_scale,
236
236
size_t *shadow_offset);
237
237
238
238
// / This is an internal function that is called to report an error. However,
@@ -245,31 +245,31 @@ void __sanitizer_cdecl __asan_get_shadow_mapping(size_t *shadow_scale,
245
245
// / \param addr Address of the ASan error.
246
246
// / \param is_write True if the error is a write error; false otherwise.
247
247
// / \param access_size Size of the memory access of the ASan error.
248
- void __sanitizer_cdecl __asan_report_error (void *pc, void *bp, void *sp,
248
+ void SANITIZER_CDECL __asan_report_error (void *pc, void *bp, void *sp,
249
249
void *addr, int is_write,
250
250
size_t access_size);
251
251
252
252
// Deprecated. Call __sanitizer_set_death_callback instead.
253
- void __sanitizer_cdecl __asan_set_death_callback (void (*callback)(void ));
253
+ void SANITIZER_CDECL __asan_set_death_callback (void (*callback)(void ));
254
254
255
255
// / Sets the callback function to be called during ASan error reporting.
256
256
// /
257
257
// / The callback provides a string pointer to the report.
258
258
// /
259
259
// / \param callback User-provided function.
260
- void __sanitizer_cdecl
260
+ void SANITIZER_CDECL
261
261
__asan_set_error_report_callback (void (*callback)(const char *));
262
262
263
263
// / User-provided callback on ASan errors.
264
264
// /
265
265
// / You can provide a function that would be called immediately when ASan
266
266
// / detects an error. This is useful in cases when ASan detects an error but
267
267
// / your program crashes before the ASan report is printed.
268
- void __sanitizer_cdecl __asan_on_error (void );
268
+ void SANITIZER_CDECL __asan_on_error (void );
269
269
270
270
// / Prints accumulated statistics to <c>stderr</c> (useful for calling from the
271
271
// / debugger).
272
- void __sanitizer_cdecl __asan_print_accumulated_stats (void );
272
+ void SANITIZER_CDECL __asan_print_accumulated_stats (void );
273
273
274
274
// / User-provided default option settings.
275
275
// /
@@ -278,7 +278,7 @@ void __sanitizer_cdecl __asan_print_accumulated_stats(void);
278
278
// / <c>verbosity=1:halt_on_error=0</c>).
279
279
// /
280
280
// / \returns Default options string.
281
- const char *__sanitizer_cdecl __asan_default_options (void );
281
+ const char *SANITIZER_CDECL __asan_default_options (void );
282
282
283
283
// The following two functions facilitate garbage collection in presence of
284
284
// ASan's fake stack.
@@ -290,7 +290,7 @@ const char *__sanitizer_cdecl __asan_default_options(void);
290
290
// / does not have a fake stack.
291
291
// /
292
292
// / \returns An opaque handler to the fake stack or NULL.
293
- void *__sanitizer_cdecl __asan_get_current_fake_stack (void );
293
+ void *SANITIZER_CDECL __asan_get_current_fake_stack (void );
294
294
295
295
// / Checks if an address belongs to a given fake stack.
296
296
// /
@@ -310,7 +310,7 @@ void *__sanitizer_cdecl __asan_get_current_fake_stack(void);
310
310
// / \param[out] beg Beginning of fake frame.
311
311
// / \param[out] end End of fake frame.
312
312
// / \returns Stack address or NULL.
313
- void *__sanitizer_cdecl __asan_addr_is_in_fake_stack (void *fake_stack,
313
+ void *SANITIZER_CDECL __asan_addr_is_in_fake_stack (void *fake_stack,
314
314
void *addr, void **beg,
315
315
void **end);
316
316
@@ -319,11 +319,11 @@ void *__sanitizer_cdecl __asan_addr_is_in_fake_stack(void *fake_stack,
319
319
// /
320
320
// / To avoid false positives on the stack, must be called before no-return
321
321
// / functions like <c>_exit()</c> and <c>execl()</c>.
322
- void __sanitizer_cdecl __asan_handle_no_return (void );
322
+ void SANITIZER_CDECL __asan_handle_no_return (void );
323
323
324
324
// / Update allocation stack trace for the given allocation to the current stack
325
325
// / trace. Returns 1 if successful, 0 if not.
326
- int __sanitizer_cdecl __asan_update_allocation_context (void *addr);
326
+ int SANITIZER_CDECL __asan_update_allocation_context (void *addr);
327
327
328
328
#ifdef __cplusplus
329
329
} // extern "C"
0 commit comments