[llvm-dev] [ASan][Windows] Interceptor function type not compatible with intercepted function

Julian Lettner via llvm-dev llvm-dev at lists.llvm.org
Fri Apr 26 13:10:18 PDT 2019


Hi,

I triggered a build failure on a Windows-sanitizer by making the sanity checking in `ASAN_INTERCEPT_FUNC` a bit stricter.
My best guess is that the type of the defined interceptor is not compatible (in C++ typing terms) with the “real” function.

This seems to be the case for the following 2 functions:

CreateThread “no conversion”:
From: 'DWORD  (__cdecl *)(void *               , __sanitizer::uptr, DWORD (__cdecl *)(void *), void *, DWORD, void * )'
To  : 'HANDLE (__cdecl *)(LPSECURITY_ATTRIBUTES, SIZE_T           , LPTHREAD_START_ROUTINE   , LPVOID, DWORD, LPDWORD)'

__C_specific_handler:
From: 'int                   (__cdecl *)(void *             , void *, void *    , void *               )'
To:   'EXCEPTION_DISPOSITION (__cdecl *)(_EXCEPTION_RECORD *, void *, _CONTEXT *, _DISPATCHER_CONTEXT *)'


Can someone on the Windows side take a quick look and revert my temporary fix?

Thanks!
Julian


Bot failure:
http://lab.llvm.org:8011/builders/sanitizer-windows/builds/45049/steps/stage%201%20build/logs/stdio

My temporary fix:
https://github.com/llvm/llvm-project/commit/93c05f097a969666d48d67b8a658d5bc7e164478 <https://github.com/llvm/llvm-project/commit/93c05f097a969666d48d67b8a658d5bc7e164478>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190426/7596b75b/attachment.html>


More information about the llvm-dev mailing list