[PATCH] D149002: [compiler-rt][interception][asan][win] Improve error reporting
Alvin Wong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 1 01:59:51 PDT 2023
alvinhochun marked an inline comment as done.
alvinhochun added inline comments.
================
Comment at: compiler-rt/lib/asan/asan_mac.cpp:47
namespace __asan {
+void PlatformBeforeInitializeAsanInterceptors() {}
----------------
vitalybuka wrote:
> Can we instead move InitializePlatformInterceptors() in to the beginning of InitializeAsanInterceptors()?
Yeah, looks like we can do that.
================
Comment at: compiler-rt/lib/interception/interception_win.cpp:157-161
+# define Report(...) \
+ do { \
+ if (ErrorReportCallback) \
+ ErrorReportCallback(__VA_ARGS__); \
+ } while (0)
----------------
vitalybuka wrote:
> Can we avoid a macro?
> static inline should work?
>
> Can you call it ReportError, to avoid confusion for Report in common
The problem is calling a variadic function, there is no way that I know of to just forward the arguments without using `va_list`. There is currently not a version of `__sanitizer::Report` that takes `va_list`, so I would have to add one, which is more work than just using a macro here.
I can rename the macro to `ReportError`, yes.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149002/new/
https://reviews.llvm.org/D149002
More information about the llvm-commits
mailing list