diff options
author | mkrebs@chromium.org <mkrebs@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-10-08 20:33:06 +0000 |
---|---|---|
committer | mkrebs@chromium.org <mkrebs@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-10-08 20:33:06 +0000 |
commit | 1500c419664a0f8387f776d66ecc0b0051e44ce9 (patch) | |
tree | 973a7b100aafe020617d46c21b096d034bf83d48 /src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc | |
parent | Comment out unused arguments in definitions, as required by the Google C++ St... (diff) | |
download | breakpad-1500c419664a0f8387f776d66ecc0b0051e44ce9.tar.xz |
Don't bail if a thread's stack pointer is invalid
Currently, if a thread's stack pointer is not within a valid memory page,
the minidump writing will fail with an error. This change allows an invalid
stack pointer by simply setting the memory size to zero in the minidump.
The processing code already checks for the size being zero, although it
currently just gives an error (see https://breakpad.appspot.com/413002/).
BUG=google-breakpad:499, chromium-os:34880
TEST=make check, manually ran minidump-2-core and core2md
Review URL: https://breakpad.appspot.com/478002
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1065 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc')
-rw-r--r-- | src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc b/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc index ba3548c5..ee3593cd 100644 --- a/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc +++ b/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc @@ -230,6 +230,10 @@ TEST(LinuxPtraceDumperTest, VerifyStackReadWithMultipleThreads) { ThreadInfo one_thread; for (size_t i = 0; i < dumper.threads().size(); ++i) { EXPECT_TRUE(dumper.GetThreadInfoByIndex(i, &one_thread)); + const void* stack; + size_t stack_len; + EXPECT_TRUE(dumper.GetStackInfo(&stack, &stack_len, + one_thread.stack_pointer)); // In the helper program, we stored a pointer to the thread id in a // specific register. Check that we can recover its value. #if defined(__ARM_EABI__) |