Instead, include ASan headers in asan_dll_thunk.cc and make
use of __asan_init macro expansion.
Details
Diff Detail
Event Timeline
This doesn't compile :-(
lib/asan/asan_dll_thunk.cc | ||
---|---|---|
238 | The thing is that asan_interface_internal.h defines pretty much the same set of functions that I do here using the INTERFACE_FUNCTION macro. For editing simplicity reasons, the INTERFACE_FUNCTION macro doesn't know the argument types of the function, so we end up with conflicts between two declarations: asan_dll_thunk.cc(238) : error C2733: '__asan_memcpy' : second C linkage of overloaded function not allowed asan_interface_internal.h(156) : see declaration of '__asan_memcpy' asan_dll_thunk.cc(238) : error C2440: 'type cast' : cannot convert from 'overloaded-function' to '__sanitizer::uptr' Context does not allow for disambiguation of overloaded function This is basically the reason why I haven't just used __asan_init in the first place... | |
lib/asan/asan_interface_internal.h | ||
36 | Suggestion: can probably use the # macro operator here? |
lib/asan/asan_dll_thunk.cc | ||
---|---|---|
238 | Yeah, let's create asan_init_version.h which would hold all the comments about ABI versions and have #define ASAN_VERSIONED_INIT __asan_init_v4 and get rid of all __asan_init mentions throughout the code. Kostya, are you OK with that? |
The thing is that asan_interface_internal.h defines pretty much the same set of functions that I do here using the INTERFACE_FUNCTION macro. For editing simplicity reasons, the INTERFACE_FUNCTION macro doesn't know the argument types of the function, so we end up with conflicts between two declarations:
This is basically the reason why I haven't just used __asan_init in the first place...
Can we move declarations/definitions between headers somehow or have a minimalistic declaration-only new header for __asan_init?