diff options
author | ted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2013-05-17 19:50:00 +0000 |
---|---|---|
committer | ted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2013-05-17 19:50:00 +0000 |
commit | ecd727f3866efa8894155787cf29537a7a582987 (patch) | |
tree | bc7cd8cd5c7b5b67a697c03f72257d4d7606a27f /src/client/linux | |
parent | Use std::vector with a custom allocator wrapping PageAllocator for wasteful_v... (diff) | |
download | breakpad-ecd727f3866efa8894155787cf29537a7a582987.tar.xz |
Ensure a proper LinuxDumper::crash_thread_ value
Patch by Mike Hommey <mh@glandium.org>, R=me at https://breakpad.appspot.com/582002/
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1185 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/linux')
-rw-r--r-- | src/client/linux/minidump_writer/linux_dumper.cc | 2 | ||||
-rw-r--r-- | src/client/linux/minidump_writer/minidump_writer_unittest.cc | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/client/linux/minidump_writer/linux_dumper.cc b/src/client/linux/minidump_writer/linux_dumper.cc index 6a75ba94..e5a341ca 100644 --- a/src/client/linux/minidump_writer/linux_dumper.cc +++ b/src/client/linux/minidump_writer/linux_dumper.cc @@ -73,7 +73,7 @@ LinuxDumper::LinuxDumper(pid_t pid) : pid_(pid), crash_address_(0), crash_signal_(0), - crash_thread_(0), + crash_thread_(pid), threads_(&allocator_, 8), mappings_(&allocator_), auxv_(&allocator_, AT_MAX + 1) { diff --git a/src/client/linux/minidump_writer/minidump_writer_unittest.cc b/src/client/linux/minidump_writer/minidump_writer_unittest.cc index 7d6b8667..9b7d73c0 100644 --- a/src/client/linux/minidump_writer/minidump_writer_unittest.cc +++ b/src/client/linux/minidump_writer/minidump_writer_unittest.cc @@ -84,7 +84,7 @@ TEST(MinidumpWriterTest, SetupWithPath) { AutoTempDir temp_dir; string templ = temp_dir.path() + kMDWriterUnitTestFileName; // Set a non-zero tid to avoid tripping asserts. - context.tid = 1; + context.tid = child; ASSERT_TRUE(WriteMinidump(templ.c_str(), child, &context, sizeof(context))); struct stat st; ASSERT_EQ(0, stat(templ.c_str(), &st)); @@ -114,7 +114,7 @@ TEST(MinidumpWriterTest, SetupWithFD) { string templ = temp_dir.path() + kMDWriterUnitTestFileName; int fd = open(templ.c_str(), O_CREAT | O_WRONLY, S_IRWXU); // Set a non-zero tid to avoid tripping asserts. - context.tid = 1; + context.tid = child; ASSERT_TRUE(WriteMinidump(fd, child, &context, sizeof(context))); struct stat st; ASSERT_EQ(0, stat(templ.c_str(), &st)); @@ -391,7 +391,7 @@ TEST(MinidumpWriterTest, DeletedBinary) { string templ = temp_dir.path() + kMDWriterUnitTestFileName; // Set a non-zero tid to avoid tripping asserts. - context.tid = 1; + context.tid = child_pid; ASSERT_TRUE(WriteMinidump(templ.c_str(), child_pid, &context, sizeof(context))); kill(child_pid, SIGKILL); |