Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: src/client/linux/minidump_writer/linux_dumper.cc

Issue 1750033002: Don't merge the mappings if their exec bit are different. (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010, Google Inc. 1 // Copyright (c) 2010, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 reinterpret_cast<void*>(start_addr) == linux_gate_loc) { 347 reinterpret_cast<void*>(start_addr) == linux_gate_loc) {
348 name = kLinuxGateLibraryName; 348 name = kLinuxGateLibraryName;
349 offset = 0; 349 offset = 0;
350 } 350 }
351 // Merge adjacent mappings with the same name into one module, 351 // Merge adjacent mappings with the same name into one module,
352 // assuming they're a single library mapped by the dynamic linker 352 // assuming they're a single library mapped by the dynamic linker
353 if (name && !mappings_.empty()) { 353 if (name && !mappings_.empty()) {
354 MappingInfo* module = mappings_.back(); 354 MappingInfo* module = mappings_.back();
355 if ((start_addr == module->start_addr + module->size) && 355 if ((start_addr == module->start_addr + module->size) &&
356 (my_strlen(name) == my_strlen(module->name)) && 356 (my_strlen(name) == my_strlen(module->name)) &&
357 (my_strncmp(name, module->name, my_strlen(name)) == 0)) { 357 (my_strncmp(name, module->name, my_strlen(name)) == 0) &&
358 (exec == module->exec)) {
358 module->size = end_addr - module->start_addr; 359 module->size = end_addr - module->start_addr;
359 line_reader->PopLine(line_len); 360 line_reader->PopLine(line_len);
360 continue; 361 continue;
361 } 362 }
362 } 363 }
363 // Also merge mappings that result from address ranges that the 364 // Also merge mappings that result from address ranges that the
364 // linker reserved but which a loaded library did not use. These 365 // linker reserved but which a loaded library did not use. These
365 // appear as an anonymous private mapping with no access flags set 366 // appear as an anonymous private mapping with no access flags set
366 // and which directly follow an executable mapping. 367 // and which directly follow an executable mapping.
367 if (!name && !mappings_.empty()) { 368 if (!name && !mappings_.empty()) {
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 exe_stat.st_dev == new_path_stat.st_dev && 597 exe_stat.st_dev == new_path_stat.st_dev &&
597 exe_stat.st_ino == new_path_stat.st_ino) { 598 exe_stat.st_ino == new_path_stat.st_ino) {
598 return false; 599 return false;
599 } 600 }
600 601
601 my_memcpy(path, exe_link, NAME_MAX); 602 my_memcpy(path, exe_link, NAME_MAX);
602 return true; 603 return true;
603 } 604 }
604 605
605 } // namespace google_breakpad 606 } // namespace google_breakpad
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698