[llvm-dev] [ASan][Windows] Interceptor function type not compatible with intercepted function
Reid Kleckner via llvm-dev
llvm-dev at lists.llvm.org
Mon Apr 29 13:26:46 PDT 2019
On Fri, Apr 26, 2019 at 4:14 PM David Major via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> It looks like the parameters of the interceptors were written in more
> familiar/basic types rather than their official Windows formats. I've seen
> that done in another project to avoid pulling in some of the more obscure
> Windows headers, although that doesn't seem to be a problem here. Maybe it
> was done to avoid noisy casts in the interceptor body, I don't know.
> Ideally the fix is to "just" use the correct types, but maybe it's not that
> simple. Try it and see what happens.
>
I think we can get away with forward declaring the types as needed to avoid
a hard dependency on windows.h.
It looks like this may have found a real bug, though, since the real
CreateThread returns a full pointer (HANDLE) and ours appears to return
DWORD, which is too small.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190429/64b8a702/attachment.html>
More information about the llvm-dev
mailing list