Skip to content

Commit 15b0cb4

Browse files
authored
[windows][ASan] Fix build (#70855)
PR #69625 broke the build - I put __cdecl on the wrong side of the `*` in function pointer declarations. Lesson learned - run check-all!
1 parent 89a2e70 commit 15b0cb4

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

compiler-rt/include/sanitizer/allocator_interface.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ void SANITIZER_CDECL __sanitizer_free_hook(const volatile void *ptr);
8383
other threads.
8484
*/
8585
int SANITIZER_CDECL __sanitizer_install_malloc_and_free_hooks(
86-
void (*SANITIZER_CDECL malloc_hook)(const volatile void *, size_t),
87-
void (*SANITIZER_CDECL free_hook)(const volatile void *));
86+
void(SANITIZER_CDECL *malloc_hook)(const volatile void *, size_t),
87+
void(SANITIZER_CDECL *free_hook)(const volatile void *));
8888

8989
/* Drains allocator quarantines (calling thread's and global ones), returns
9090
freed memory back to OS and releases other non-essential internal allocator

compiler-rt/include/sanitizer/dfsan_interface.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ typedef uint8_t dfsan_label;
2525
typedef uint32_t dfsan_origin;
2626

2727
/// Signature of the callback argument to dfsan_set_write_callback().
28-
typedef void (*SANITIZER_CDECL dfsan_write_callback_t)(int fd, const void *buf,
29-
size_t count);
28+
typedef void(SANITIZER_CDECL *dfsan_write_callback_t)(int fd, const void *buf,
29+
size_t count);
3030

3131
/// Signature of the callback argument to dfsan_set_conditional_callback().
32-
typedef void (*SANITIZER_CDECL dfsan_conditional_callback_t)(
32+
typedef void(SANITIZER_CDECL *dfsan_conditional_callback_t)(
3333
dfsan_label label, dfsan_origin origin);
3434

3535
/// Signature of the callback argument to dfsan_set_reaches_function_callback().
3636
/// The description is intended to hold the name of the variable.
37-
typedef void (*SANITIZER_CDECL dfsan_reaches_function_callback_t)(
37+
typedef void(SANITIZER_CDECL *dfsan_reaches_function_callback_t)(
3838
dfsan_label label, dfsan_origin origin, const char *file, unsigned int line,
3939
const char *function);
4040

compiler-rt/include/sanitizer/msan_interface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ const char *SANITIZER_CDECL __msan_default_options(void);
108108

109109
/* Deprecated. Call __sanitizer_set_death_callback instead. */
110110
void SANITIZER_CDECL
111-
__msan_set_death_callback(void (*SANITIZER_CDECL callback)(void));
111+
__msan_set_death_callback(void(SANITIZER_CDECL *callback)(void));
112112

113113
/* Update shadow for the application copy of size bytes from src to dst.
114114
Src and dst are application addresses. This function does not copy the

0 commit comments

Comments
 (0)