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

samsonov at google.com samsonov at google.com
Fri Feb 24 06:35:52 PST 2012


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

http://codereview.appspot.com/5699064/diff/4001/lib/asan/asan_interceptors_win.h#newcode21
lib/asan/asan_interceptors_win.h:21:
iwyu "interception/interception.h" ? Or it's 2-step reverse include
guard?

http://codereview.appspot.com/5699064/diff/4001/lib/asan/asan_interceptors_win.h#newcode24
lib/asan/asan_interceptors_win.h:24: DWORD (__stdcall
*start_routine)(void*), void* arg,
You use DWORD, GET_STACK_TRACE_HERE, AsanThread etc. and don't include
any headers. Is this planned, i.e. do you really want to assume that
someone will include "asan_thread.h" etc. before including your header
along the lines of "asan_interceptors.cc"?

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

http://codereview.appspot.com/5699064/diff/4001/lib/asan/asan_thread.h#newcode73
lib/asan/asan_thread.h:73: ThreadReturnType ThreadStart();
ThreadStartRoutineReturnType?

http://codereview.appspot.com/5699064/diff/4001/lib/asan/asan_thread.h#newcode99
lib/asan/asan_thread.h:99: ThreadProc start_routine_;
ThreadStartRoutineType?

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#newcode109
lib/asan/interception/interception.h:109: // foo with an interceptor for
other function.
Move this comment before DEFINE_REAL?

http://codereview.appspot.com/5699064/diff/4001/lib/asan/interception/interception.h#newcode126
lib/asan/interception/interception.h:126: INTERCEPTOR_EX(ret_type, ,
func, __VA_ARGS__)
...ret_type, /*no convention*/, func, ... ?

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, ...) \
Do we want to have similar macro for other OS? Maybe, it's better to
move this into interception_win.h and add comment here?

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



More information about the llvm-commits mailing list