From bc1e904f09c0e000a9fa9295e8c846c9863685c5 Mon Sep 17 00:00:00 2001 From: Alex Gough Date: Fri, 23 Jun 2023 13:33:37 -0700 Subject: [PATCH] SetErrorMode() in fastfail tests Some versions of python call SetErrorMode which disables WerFault handling for the fastfail test programs. We can set this to a useful value, allowing these tests to run again locally. This does not enable the tests on the bots as they continue to fail. Bug: crashpad:458 Change-Id: Ibdd2f92ed872bd76490db32dccb2257dd91f8280 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4641231 Reviewed-by: Mark Mentovai Commit-Queue: Alex Gough --- handler/win/fastfail_test_program.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/handler/win/fastfail_test_program.cc b/handler/win/fastfail_test_program.cc index 510ee56e..346aa68a 100644 --- a/handler/win/fastfail_test_program.cc +++ b/handler/win/fastfail_test_program.cc @@ -129,6 +129,10 @@ int CrashyMain(int argc, wchar_t* argv[]) { return EXIT_FAILURE; } + // Some versions of python call SetErrorMode() which extends to children, and + // prevents the WerFault infrastructure from running. + SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX); + if (type == L"cf") CfgCrash(); if (type == L"ff")