mirror of
https://github.com/chromium/crashpad.git
synced 2025-01-14 09:17:57 +08:00
DumpAndCrash in extended handler test in favor of debug break.
As the crashing function runs inside GoogleTests SEH handler, I think it, or something in the OS may be interfering with the exception dispatch somehow. In any case, if this flakes, we have no one to blame but ourselves. Bug: crashpad:773569 Change-Id: I2230d02735be4a71b688e1acc94d0ae6f082d9bd Reviewed-on: https://chromium-review.googlesource.com/739464 Reviewed-by: Mark Mentovai <mark@chromium.org> Commit-Queue: Sigurður Ásgeirsson <siggi@chromium.org>
This commit is contained in:
parent
5e9ed4cb9f
commit
cb3aa9c4d8
@ -28,11 +28,14 @@
|
||||
#include "test/test_paths.h"
|
||||
#include "test/win/win_multiprocess_with_temp_dir.h"
|
||||
#include "util/file/file_reader.h"
|
||||
#include "util/win/capture_context.h"
|
||||
|
||||
namespace crashpad {
|
||||
namespace test {
|
||||
namespace {
|
||||
|
||||
constexpr DWORD kExpectedExitCode = 0x1CEB00DA;
|
||||
|
||||
void StartAndCrashWithExtendedHandler(const base::FilePath& temp_dir) {
|
||||
base::FilePath handler_path = TestPaths::Executable().DirName().Append(
|
||||
FILE_PATH_LITERAL("crashpad_handler_test_extended_handler.exe"));
|
||||
@ -47,7 +50,14 @@ void StartAndCrashWithExtendedHandler(const base::FilePath& temp_dir) {
|
||||
false,
|
||||
false));
|
||||
|
||||
__debugbreak();
|
||||
// It appears that the GoogleTest fixture will catch and handle exceptions
|
||||
// from here. Hence the fabricated crash in favor of raising an exception.
|
||||
EXCEPTION_RECORD exception_record = {kExpectedExitCode,
|
||||
EXCEPTION_NONCONTINUABLE};
|
||||
CONTEXT context;
|
||||
CaptureContext(&context);
|
||||
EXCEPTION_POINTERS exception_pointers = {&exception_record, &context};
|
||||
CrashpadClient::DumpAndCrash(&exception_pointers);
|
||||
}
|
||||
|
||||
class CrashWithExtendedHandler final : public WinMultiprocessWithTempDir {
|
||||
@ -59,7 +69,7 @@ class CrashWithExtendedHandler final : public WinMultiprocessWithTempDir {
|
||||
void ValidateGeneratedDump();
|
||||
|
||||
void WinMultiprocessParent() override {
|
||||
SetExpectedChildExitCode(EXCEPTION_BREAKPOINT);
|
||||
SetExpectedChildExitCode(kExpectedExitCode);
|
||||
}
|
||||
|
||||
void WinMultiprocessChild() override {
|
||||
|
Loading…
x
Reference in New Issue
Block a user