From ece9df9386056f8d2cf223162c15833b153fd699 Mon Sep 17 00:00:00 2001 From: "ted.mielczarek@gmail.com" Date: Fri, 29 Mar 2013 15:06:24 +0000 Subject: [PATCH] Get the complete linux gate mapping instead of only one page A=Mike Hommey R=ted at https://breakpad.appspot.com/542002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1134 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/client/linux/minidump_writer/linux_dumper.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/client/linux/minidump_writer/linux_dumper.cc b/src/client/linux/minidump_writer/linux_dumper.cc index 2124224e..6a75ba94 100644 --- a/src/client/linux/minidump_writer/linux_dumper.cc +++ b/src/client/linux/minidump_writer/linux_dumper.cc @@ -99,15 +99,14 @@ LinuxDumper::ElfFileIdentifierForMapping(const MappingInfo& mapping, // Special-case linux-gate because it's not a real file. if (my_strcmp(mapping.name, kLinuxGateLibraryName) == 0) { - const uintptr_t kPageSize = getpagesize(); void* linux_gate = NULL; if (pid_ == sys_getpid()) { linux_gate = reinterpret_cast(mapping.start_addr); } else { - linux_gate = allocator_.Alloc(kPageSize); + linux_gate = allocator_.Alloc(mapping.size); CopyFromProcess(linux_gate, pid_, reinterpret_cast(mapping.start_addr), - kPageSize); + mapping.size); } return FileID::ElfFileIdentifierFromMappedFile(linux_gate, identifier); }