Index: handler/win/crashy_test_program.cc |
diff --git a/handler/win/crashy_test_program.cc b/handler/win/crashy_test_program.cc |
index 622a5e5df08d3218dbdd2e5d1a2ab7fca32992e2..6eb79f1caa28800ea94323f3699b0e0f2491b611 100644 |
--- a/handler/win/crashy_test_program.cc |
+++ b/handler/win/crashy_test_program.cc |
@@ -27,6 +27,8 @@ |
namespace crashpad { |
namespace { |
+CRITICAL_SECTION g_test_critical_section; |
+ |
ULONG RtlNtStatusToDosError(NTSTATUS status) { |
static decltype(::RtlNtStatusToDosError)* rtl_nt_status_to_dos_error = |
reinterpret_cast<decltype(::RtlNtStatusToDosError)*>( |
@@ -61,6 +63,10 @@ int CrashyMain(int argc, char* argv[]) { |
return 1; |
} |
+ InitializeCriticalSectionEx( |
+ &g_test_critical_section, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO); |
+ EnterCriticalSection(&g_test_critical_section); |
+ |
SomeCrashyFunction(); |
return 0; |