Chromium Code Reviews| Index: syzygy/agent/asan/rtl_impl.h |
| diff --git a/syzygy/agent/asan/rtl_impl.h b/syzygy/agent/asan/rtl_impl.h |
| index c9290bcb9c62f76417e62a61e7ec958287f9e00e..0c46ca17a514af33235d7e95357c0ff531992075 100644 |
| --- a/syzygy/agent/asan/rtl_impl.h |
| +++ b/syzygy/agent/asan/rtl_impl.h |
| @@ -105,7 +105,7 @@ void WINAPI asan_SetOnExceptionCallback(OnExceptionCallback callback); |
| // experiement. |
| typedef void(WINAPI* AsanExperimentCallback)(const char* experiment_name, |
| const char* experiment_group); |
| -// Calls @p callback once for each experiement this runtime is performing. |
| +// Calls @p callback once for each experiment this runtime is performing. |
| // @param callback a function that will be invoked recursively zero or more |
| // times to enumerate the experiments and their state. |
| void WINAPI asan_EnumExperiments(AsanExperimentCallback callback); |
| @@ -113,6 +113,29 @@ void WINAPI asan_EnumExperiments(AsanExperimentCallback callback); |
| int asan_CrashForException(EXCEPTION_POINTERS* exception); |
| +// This functions allows to manually initialize the crash reporter used by the |
|
chrisha
2017/01/13 18:16:26
allows manually initializing* and* is* used
Sébastien Marchand
2017/01/13 20:56:02
Done.
|
| +// runtime. |
| +// |
| +// It should only be used if the deferred initialization flag has been used by |
| +// the instrumented image (via the corresponding environment variable or at |
| +// instrumentation time) and should only be called once, trying to initialize |
|
chrisha
2017/01/13 18:16:26
once. Trying to initialize the crash handler a sec
Sébastien Marchand
2017/01/13 20:56:02
Done.
|
| +// the crash handler will result in a crash of the runtime library. |
| +// |
| +// Manually controlling the initialization of the crash reporter is useful when |
| +// there's no crash reporter available at initialization time (i.e. the |
| +// instrumented process hasn't initialized it yet). E.g. the instrumented image |
| +// should do something like this (additionally to using the deferred |
| +// initialization flag): |
|
chrisha
2017/01/13 18:16:26
In addition to instrumenting with the deferred ini
Sébastien Marchand
2017/01/13 20:56:02
Done.
|
| +// |
| +// InitializeCrashReporter(); |
| +// typedef VOID(WINAPI* SyzyAsanInitializeCrashHandlerFn)(); |
| +// HMODULE handle = ::GetModuleHandle(L"syzyasan_rtl.dll"); |
| +// SyzyAsanInitializeCrashHandlerFn syzyasan_init_crash_handler = |
| +// reinterpret_cast<SyzyAsanInitializeCrashHandlerFn>( |
| +// ::GetProcAddress(handle, "asan_InitializeCrashHandler")); |
| +// syzyasan_init_crash_handler(); |
| +void WINAPI asan_InitializeCrashReporter(); |
| + |
| } // extern "C" |
| #endif // SYZYGY_AGENT_ASAN_RTL_IMPL_H_ |