[llvm-commits] [ASan] Intercept CreateThread on Windows (issue 5699064)

timurrrr at google.com timurrrr at google.com
Fri Feb 24 07:24:59 PST 2012


PTAL


http://codereview.appspot.com/5699064/diff/4001/lib/asan/interception/interception.h
File lib/asan/interception/interception.h (right):

http://codereview.appspot.com/5699064/diff/4001/lib/asan/interception/interception.h#newcode128
lib/asan/interception/interception.h:128: #define
INTERCEPTOR_WINAPI(ret_type, func, ...) \
On 2012/02/24 15:20:38, samsonov wrote:
> On 2012/02/24 15:10:39, timurrrr_at_google_com wrote:
> > On 2012/02/24 14:35:53, samsonov wrote:
> > > Do we want to have similar macro for other OS?
> > We might, but highly unlikely we'll need to.
> >
> > > Maybe, it's better to move this
> > > into interception_win.h and add comment here?
> Not sure if we need to have INTERCEPTOR_WINAPI on Linux and Mac OS,
but you may
> leave it here if you wish.

Done.

http://codereview.appspot.com/5699064/diff/1017/lib/asan/asan_interceptors.cc
File lib/asan/asan_interceptors.cc (right):

http://codereview.appspot.com/5699064/diff/1017/lib/asan/asan_interceptors.cc#newcode585
lib/asan/asan_interceptors.cc:585: DWORD (__stdcall
*start_routine)(void*), void* arg,
On 2012/02/24 15:20:38, samsonov wrote:
> why not use thread_callback_t here and in pthread_create interceptor?
I want the types here to be comparable with that in the docs (e.g.
MSDN).

If the types begin to mismatch, the compile will report an error at the
first use (line 592)

http://codereview.appspot.com/5699064/diff/1017/lib/asan/asan_interceptors.cc#newcode600
lib/asan/asan_interceptors.cc:600: }  // namespace
On 2012/02/24 15:20:38, samsonov wrote:
> // namespace __asan

Done.

http://codereview.appspot.com/5699064/



More information about the llvm-commits mailing list