<div dir="ltr"><div dir="ltr">On Fri, Apr 26, 2019 at 4:14 PM David Major via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>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.</div></div></blockquote><div><br></div><div>I think we can get away with forward declaring the types as needed to avoid a hard dependency on windows.h.</div><div><br></div><div>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.</div></div></div>