[compiler-rt] [windows][ASan] Fix build (PR #70855)
nicole mazzuca via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 31 13:30:57 PDT 2023
https://github.com/strega-nil created https://github.com/llvm/llvm-project/pull/70855
PR #69625 broke the build - I put __cdecl on the wrong side of the `*` in function pointer declarations.
Lesson learned - run check-all!
>From b576a7dbcf7d542924d066de81bce56087346ebe Mon Sep 17 00:00:00 2001
From: Nicole Mazzuca <nicole at strega-nil.co>
Date: Tue, 31 Oct 2023 13:30:04 -0700
Subject: [PATCH] [windows][ASan] Fix build
PR #69625 broke the build - I put __cdecl on the wrong side of
the `*` in function pointer declarations.
Lesson learned - run check-all!
---
compiler-rt/include/sanitizer/allocator_interface.h | 4 ++--
compiler-rt/include/sanitizer/dfsan_interface.h | 6 +++---
compiler-rt/include/sanitizer/msan_interface.h | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/compiler-rt/include/sanitizer/allocator_interface.h b/compiler-rt/include/sanitizer/allocator_interface.h
index 19af06969e08353..03eb03a11065dcd 100644
--- a/compiler-rt/include/sanitizer/allocator_interface.h
+++ b/compiler-rt/include/sanitizer/allocator_interface.h
@@ -83,8 +83,8 @@ void SANITIZER_CDECL __sanitizer_free_hook(const volatile void *ptr);
other threads.
*/
int SANITIZER_CDECL __sanitizer_install_malloc_and_free_hooks(
- void (*SANITIZER_CDECL malloc_hook)(const volatile void *, size_t),
- void (*SANITIZER_CDECL free_hook)(const volatile void *));
+ void (SANITIZER_CDECL *malloc_hook)(const volatile void *, size_t),
+ void (SANITIZER_CDECL *free_hook)(const volatile void *));
/* Drains allocator quarantines (calling thread's and global ones), returns
freed memory back to OS and releases other non-essential internal allocator
diff --git a/compiler-rt/include/sanitizer/dfsan_interface.h b/compiler-rt/include/sanitizer/dfsan_interface.h
index 1084ec1f53cc091..16f2b67b9395085 100644
--- a/compiler-rt/include/sanitizer/dfsan_interface.h
+++ b/compiler-rt/include/sanitizer/dfsan_interface.h
@@ -25,16 +25,16 @@ typedef uint8_t dfsan_label;
typedef uint32_t dfsan_origin;
/// Signature of the callback argument to dfsan_set_write_callback().
-typedef void (*SANITIZER_CDECL dfsan_write_callback_t)(int fd, const void *buf,
+typedef void (SANITIZER_CDECL *dfsan_write_callback_t)(int fd, const void *buf,
size_t count);
/// Signature of the callback argument to dfsan_set_conditional_callback().
-typedef void (*SANITIZER_CDECL dfsan_conditional_callback_t)(
+typedef void (SANITIZER_CDECL *dfsan_conditional_callback_t)(
dfsan_label label, dfsan_origin origin);
/// Signature of the callback argument to dfsan_set_reaches_function_callback().
/// The description is intended to hold the name of the variable.
-typedef void (*SANITIZER_CDECL dfsan_reaches_function_callback_t)(
+typedef void (SANITIZER_CDECL *dfsan_reaches_function_callback_t)(
dfsan_label label, dfsan_origin origin, const char *file, unsigned int line,
const char *function);
diff --git a/compiler-rt/include/sanitizer/msan_interface.h b/compiler-rt/include/sanitizer/msan_interface.h
index 459de876894888b..946a4db2625518a 100644
--- a/compiler-rt/include/sanitizer/msan_interface.h
+++ b/compiler-rt/include/sanitizer/msan_interface.h
@@ -108,7 +108,7 @@ const char *SANITIZER_CDECL __msan_default_options(void);
/* Deprecated. Call __sanitizer_set_death_callback instead. */
void SANITIZER_CDECL
-__msan_set_death_callback(void (*SANITIZER_CDECL callback)(void));
+__msan_set_death_callback(void (SANITIZER_CDECL *callback)(void));
/* Update shadow for the application copy of size bytes from src to dst.
Src and dst are application addresses. This function does not copy the
More information about the llvm-commits
mailing list